Broadcast Receiver Working On Emulator But Not On Working Real Device (android Oreo)
Broadcast receiver it's work perfectly when I kill my application it work in background. but i installed my real device it's don't when i kill application. > Java Code
Solution 1:
From android 8 onwards, if you have any implicit broadcast, you have to register it within your activity not in manifest In your case
<actionandroid:name="android.intent.action.SCREEN_ON"/><actionandroid:name="android.provider.Telephony.SMS_RECEIVED"/>
seems to be implicit broadcast. Try registering them in your activity class using intentFilter.addAction(Your Action)
Also unregister you receiver in onStop by calling unregisterReceiver(Receiver instance)
Post a Comment for "Broadcast Receiver Working On Emulator But Not On Working Real Device (android Oreo)"