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

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -