0

how to send AT commands to a dual sim phone ?
I tried AT+CSIMSEL in a C# Program (using 32feet library) but it don't work on my Nokia phone.
Thanks

1 Answers1

0

To send AT command to phone Modem your application process must run in phone process.

Android provided a API invokeOemRilRequestStrings to send AT command to Modem at Phone instance.

android:sharedUserId="android.uid.phone"

Manifest file tag

android:process="com.android.phone" 

Under application tag

void SendAtToModem() {
    String s[] = new String[2];
    s[0] = "AT+XXXXX=" + "1"; 

AT command plus its value that you want to set

    s[1] = "";

    Phone[] phones = PhoneFactory.getPhones();
    phones[0].invokeOemRilRequestStrings(s, null);

To send at Modem 1

    phones[1].invokeOemRilRequestStrings(s, null);

To send at Modem 2

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
amit
  • 1
  • 1