I'm doing my college project which was Parental Control app. In that I'm creating a Custom Receiver. I'm tested that app in jelly bean,kitkat,lollipop, marshmallow, naughat ,oreo. But it only works in jelly bean and kitkat. I'm tried reading all solutions in stackoverflow. Please give solution for me!
manifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.nizam.training.parentalcontrol">
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<application
android:fullBackupContent="false"
android:allowBackup="true"
android:icon="@mipmap/m"
android:label="@string/app_name"
android:logo="@mipmap/ico"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<service
android:name=".BlockService"
android:enabled="true"
android:exported="true"/>
<activity android:name=".AppSettingActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
</intent-filter>
</activity>
<activity
android:name=".BlockActivity"
android:theme="@style/Theme.AppCompat.Light.NoActionBar" />
<activity
android:name=".MainActivity"
android:theme="@style/Theme.AppCompat.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".LoginActivity"
android:label="Login"
android:theme="@style/MyTheme" />
<activity
android:name=".SignupActivity"
android:label="Create Pin"
android:theme="@style/MyTheme" />
<activity
android:name=".TaskList"
android:label="Tasks"
android:theme="@style/AppTheme">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
</intent-filter>
</activity>
<receiver
android:name=".MyReceiver"
android:enabled="true"
android:exported="true"
android:permission=""
tools:ignore="ExportedReceiver">
<intent-filter>
<action android:name="StartupReceiver_Manual_Start" />
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</receiver>
<receiver android:name=".CheckRunningApplicationReceiver" />
</application></manifest>
Calling broabcast in TaskListActivity.java
getApplicationContext.sendBroadcast(new Intent("StartupReceiver_Manual_Start"))
LogCat
http://mnktalktech.blogspot.com/2019/02/logcat-for-parentalcontrol.html