且构网

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

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

更新时间:2023-01-06 12:18:09

如果 shell 命令 'service list' 的输出包含 'telephony.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