I need to listen for Install, Updates and Remove broadcasts via a BroadcastReceivers
, here is the definition:
<receiver android:name=".InstallReceiver">
<intent-filter>
<action android:name="android.intent.action.PACKAGE_ADDED" />
<action android:name="android.intent.action.PACKAGE_REPLACED" />
<action android:name="android.intent.action.PACKAGE_REMOVED" />
<data android:scheme="package"/>
</intent-filter>
</receiver>
Now, Is it possible to add Intent.FLAG_RECEIVER_FOREGROUND
flags to these incoming intents? because in android KitKat receivers affect to foreground services due to bug which reported here.
Any ideas on how to add this flag to incoming broadcasts?