How can send sms in android with dual sim for broadcast not intent?? How can detect dual sim in android? User wants to select sim for send sms broadcast. In android set the default sim for sending msg in dual sim in android. User have to select particular sim for sending sms.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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.
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"
and from the second SIM card
service call isms2 5 s16 "PhoneNumber" i32 0 i32 0 s16 "BodyText"
Require android.permission.SEND_SMS