android:exported="true">
<intent-filter>
<action android:name="android.provider.Telephony.SMS_RECEIVED" />
- <action android:name="com.ic.action.startfotaUpdate" />
- <action android:name="com.ic.action.fotaUpdateReply" />
</intent-filter>
</receiver>
<receiver
@Override\r
public void onReceive(Context context, Intent intent) {\r
\r
-\r
+ if (mContext==null) {\r
+ ICLogger.i("CoreService still not started , skip SMS cmd!");\r
+ return;\r
+ }\r
String action = intent.getAction();\r
if (ACTION_SMSCMD.equals(action)) {\r
String cmd = intent.getStringExtra("smsCmd");\r
public ICSmsManager( Runtime _runtime) {\r
this.runtime = _runtime;\r
this.mContext = runtime.getContextProxy().context;\r
+\r
+ IntentFilter intentfilter=new IntentFilter();\r
+ intentfilter.addAction(ACTION_SMSCMD_Reply);\r
+ this.mContext.registerReceiver(this,intentfilter);\r
}\r
\r
public void sendSMS(String phonenumber, String msg) {\r
}\r
}\r
\r
- public class SmsReceiver extends BroadcastReceiver {\r
-\r
- public SmsReceiver() {\r
- }\r
-\r
- public void onReceive(Context context, Intent intent) {\r
-\r
- }\r
-\r
- }\r
}
\ No newline at end of file