android - BroadcastReceiver onReceive not firing -


I am currently trying to make phone number verification when registering on my Android app. Thanks for your help to read my long post!

Here is my clear file with other activities

   & Lt; Usage-permission Android: name = "android.permission.INTERNET" /> & Lt; Usage-permission Android: name = "android.permission.SEND_SMS" /> & Lt; Usage-permission Android: name = "android.permission.READ_SMS" /> & Lt; Usage-permission Android: name = "android.permission.RECEIVE_SMS" /> Android: Android: Android: Android: Theme = "@ Style / Aaptim" & gt; Android: Android: Android: Android: Android: Android: Android: & lt; Receiver Android: name = ". SMSReceiver" & gt; & Lt; Intentional-Filters Android: Priority = "2147483647" & gt; & Lt; Action Android: name = "android.provider.Telephony.SMS_RECEIVED" & gt; & Lt; / Action> & Lt; / Intent-Filter & gt; & Lt; / Receiver & gt; & Lt; Activity Android: name = ". OpenSem" android: label = "@ string / title_activity_opensem" & gt; & Lt; Intent-Filter & gt; & Lt; Action Android: name = "android.intent.action.MAIN" /> & Lt; Category android: name = "android.intent.category.LAUNCHER" /> & Lt; / Intent-Filter & gt; & Lt; / Activity & gt; & Lt; / Application & gt; & Lt; / Reveal & gt;  

This is my class which I want to show a log on receiving SMS

  Public class SMSReceiver broadcasts broadcasts receiver {@with public references In reference (reference reference, intent to intent) {Log D. ("Tag", "received"); }}  

Here my class is sending SMS

  public class register pageSubmitListore onclick listener {click on Public Zero (see V) {SmsManager sm = SmsManager.getDefault (); Number = parametlist .get ("phone"); Code = randInt (100000, 99 99 99) + ""; Sm.sendTextMessage (number, blank, code, empty, empty); }}  

My problem is that I successfully sent an SMS and received it on my phone, but the "received" log was never shown. I have had a Priority issue on stack overflow And so I added android: priority = "2147483647" to my manifest, I added again to see these activities in other activities (copied from other SO posts) whether my receiver properly Pt Is girder

  Intended = Intentional ("android.provider.Telephony.SMS_RECEIVED"); & Lt; ResolveInfo & gt; Infos = getPackageManager () QueryBroadcastReceivers (Intent, 0); (ResolveInfo information: infos) {Log D. ("OpenCM", "Receiver name:" + info.activityInfo.name + "; priority =" + info.priority); }  

and the resulting log is shown below:

  08-01 15: 27: 10.417: D / OpenCM (12880): Recipient's name: Com .android.mms.transaction.HighPrivilegedSmsReceiver; Priority = 1000 08-01 15: 27: 10.417: D / OpenCM (12880): Recipient's Name: com.example.opensem.SMSReceiver; Priority = 99 9 08-01 15: 27: 10.417: D / OpenCM (12880): Recipient's Name: com.android.mms.transaction.PrivilegedSmsReceiver; Priority = 0  

It seems that my receiver priority was 999 instead of 2147483647. In addition, I did not install any SMS application, so other priority = 1000 receiver system messaging app.

Did I do something wrong? I tested my code on Red MI (MIUI) and Samsung Note II. My SMSReceiver starts registering and not receiving SMS, which was successfully sent back to both phones, any help by me will be really appreciated !!

For the potato long post.

It may be limited to your ROM, which is MIUI, I have to face the problem That my broadcast recipient can not receive the broadcast, but my app is fine on Samsung phones.


Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -