Error In Doing Interval Task Using Broadcastreceiver And Alarmmanager In Android
I am absolute beginner to Android. So now I am trying to develop a to-do list app on my own to improve my skills. My app is offline. But in my app I need to notify the user of the
Solution 1:
you missed WAKE_LOCK permission in manifest.XML:
<uses-permissionandroid:name="android.permission.WAKE_LOCK"/>
Your manifest.xml will like this:
<?xml version="1.0" encoding="utf-8"?><manifestxmlns:android="http://schemas.android.com/apk/res/android"package="com.example.bgnotification.bgnotification" ><uses-permissionandroid:name="android.permission.WAKE_LOCK"/><applicationandroid:allowBackup="true"android:icon="@mipmap/ic_launcher"android:label="@string/app_name"android:supportsRtl="true"android:theme="@style/AppTheme" ><activityandroid:name=".MainActivity"android:label="@string/app_name"android:theme="@style/AppTheme.NoActionBar" ><intent-filter><actionandroid:name="android.intent.action.MAIN" /><categoryandroid:name="android.intent.category.LAUNCHER" /></intent-filter></activity><receiverandroid:name=".RemainderReceiver"></receiver></application></manifest>
Post a Comment for "Error In Doing Interval Task Using Broadcastreceiver And Alarmmanager In Android"