How can send sms in android in dual SIM with set default sim?

谁都会走 提交于 2019-12-19 04:21:21

问题


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



来源:https://stackoverflow.com/questions/24007885/how-can-send-sms-in-android-in-dual-sim-with-set-default-sim

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!