I am new to android. I am completely stuck in using ACTION_PACKAGE_RESTARTED in my application
I removed pacakge from my emulator, also added using adb install, but received nothing. Launch the app. close it and run this application again. nothing works for me. Logcat is not registered.
Is there anything that I am missing? Please, help
public class RestartReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
String action= intent.getAction();
Log.i("D", "Inside receiver");
}
And here is the manifest file
<application android:icon="@drawable/icon" android:label="@string/app_name">
<receiver android:name=".ReceiverTest">
<intent-filter>
<action android:name="android.intent.action.PACKAGE_REMOVED" />
<action android:name="android.intent.action.PACKAGE_ADDED" />
<action android:name="android.intent.action.ACTION_PACKAGE_RESTARTED" />
</intent-filter>
</receiver>
</application>
source
share