且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在Android的双SIM卡发送短信设置默认的SIM卡?

更新时间:2023-01-06 12:14:06

如果shell命令服务列表'包含'电话的输出.registry2 ',那么手机有第二个SIM卡。如果包含' telephony.registry3 ',那么手机有三分之一的SIM卡等。

If the output of the shell command 'service list' contains 'telephony.registry2', then the phone has a second SIM card. If contains 'telephony.registry3', then phone has a third SIM card and so on.

您可以使用这个shell命令,向发送第一SIM卡:

You can use this shell command to send from the first SIM card:

service call isms 5 s16 "PhoneNumber" i32 0 i32 0 s16 "BodyText"

和从第二SIM卡

service call isms2 5 s16 "PhoneNumber" i32 0 i32 0 s16 "BodyText"

要求 android.permission.SEND_SMS