Reprint Please specify source: http://blog.csdn.net/l1028386804/article/details/46994097
Over here. A brief introduction to the method of intercepting SMS by Broadcastreceiver
1. Create SMS Broadcast receiver Smsrecevier
This class is a subclass of Broadcastreceiver, and detailed interception operations are implemented in this class. I am here simply to introduce the method, the acquisition of the text message to print out.
Detailed business logic has to be achieved by all of us.
Detailed code such as the following:
2. Licensing information
Detailed implementations such as the following:
<?XML version= "1.0" encoding= "Utf-8"? ><manifest xmlns:android= "Http://schemas.android.com/apk/res/android" Package= "Com.lyz.sms" android:versioncode= "1" android:versionname= "1.0" > <uses-sdk android:minsdkve rsion= "8" android:targetsdkversion= "/> <uses-permission android:name=" Android.permission.RECEIVE_SMS "/&G T <application android:allowbackup= "true" android:icon= "@drawable/ic_launcher" android:label= "@strin G/app_name "Android:theme=" @style/apptheme "> <activity android:name=" Com.lyz.sms.MainActiv ity "android:label=" @string/app_name "> <intent-filter> <action android:n Ame= "Android.intent.action.MAIN"/> <category android:name= "Android.intent.category.LAUNCHER"/> </intent-filter> </activity> <!--configure broadcast intercept SMS--<receiver and Roid:name= "Com.lyz.receiver. Smsrecevier "> <intent-filter android:priority=" "> <action android:name=" Android. Provider. Telephony.sms_received "/> </intent-filter> </receiver> </application></manife St>
Done. Is it as simple as "Android-intercept outbound calls"?
Warm tip: You can go to http://download.csdn.net/detail/l1028386804/8921125 intercept to get the complete code demo sample
Android--Intercept SMS