SMS Broadcast Receiver not working
Found a solution.
First make another app your default SMS app.
Then: Google Hangout --> Settings (Disable merged conversations) --> SMS (Disable SMS)
SMS BroadcastReceiver stops working after sometime
The issue was the the EMUI, MIUI etc were killing the background tasks. After whitelisting the app, it works fine now.
SMS receiver stops working after sometime
Finally, made it working in higher versions too, just by adding
android:permission="android.permission.BROADCAST_SMS"
in the receiver tag in AndroidManifest.xml
and made it something like -
<receiver android:name=".receiver.SmsListener"
android:permission="android.permission.BROADCAST_SMS"
>
<intent-filter android:priority="999">
<action android:name="android.provider.Telephony.SMS_RECEIVED" />
</intent-filter>
</receiver>
Related Topics
Livedata Prevent Receive the Last Value When Start Observing
Android: Automatically Choose Debug/Release Maps V2 API Key
Android Background Drawable Not Working in Button Since Android Studio 4.1
Httpurlconnection Worked Fine in Android 2.X But Not in 4.1: No Authentication Challenges Found
Erase Bitmap Parts Using Porterduff Mode
How to Setlayoutparams() for an Imageview
How to Start an Activity from Within a Fragment
How to Reference an Asset in a Library Project
Problem Inflating Custom View for Alertdialog in Dialogfragment
Play Sound Using Soundpool Example
Android Background Drawable Not Working in Button Since Android Studio 4.1
Highlight Listview Selected Row
Naming My Application in Android
"Gps" Location Provider Requires Access_Fine_Location Permission for Android 6.0