Why broadcast receiver is not working in background after app closed in Android 6.0+? -
the problem in broadcast receiver in android marshmallow.
<receiver android:name="callreceiver" android:enabled="true" android:exported="true" android:stopwithtask="false" android:permission="android.permission.read_phone_state" android:protectionlevel="signature"> <intent-filter> <action android:name="youneverkill"/> </intent-filter> <intent-filter> <action android:name="android.intent.action.phone_state"/> <action android:name="android.intent.action.new_outgoing_call"/> </intent-filter> </receiver>
because android-m i.e. 6+ versions require runtime permissions.you can refer below document: https://developer.android.com/training/permissions/requesting.html https://inthecheesefactory.com/blog/things-you-need-to-know-about-android-m-permission-developer-edition/en
Comments
Post a Comment