如何将AT命令发送到双SIM卡手机?
我在C#程序中尝试AT+CSIMSEL
(使用32feet库),但它无法在我的诺基亚手机上工作。
感谢
答案 0 :(得分:0)
要将AT命令发送到手机调制解调器,您的申请流程必须在手机过程中运行。 android提供了一个API invokeOemRilRequestStrings,用于向Phone实例的Modem发送AT命令。
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