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.
Asked
Active
Viewed 1.4k times
2
-
Refer this ... It will help you.. http://stackoverflow.com/questions/14517338/android-check-whether-the-phone-is-dual-sim/17499889#17499889 – Mahendran Candy Apr 22 '16 at 08:53
1 Answers
2
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
-
1
-
`Runtime.getRuntime().exec("service list");` Read manual about Runtime: (http://developer.android.com/reference/java/lang/Runtime.html) – eGregory Oct 30 '14 at 08:09
-
Here is a complete solution for sending and reading SMS for dual sim device for android older than 5... Ihttp://stackoverflow.com/a/30677542/2267723 – Maher Abuthraa Dec 02 '15 at 11:26