According to the Android O migration guide provided by Google, most of the implicit translation of an intent should not be recorded in the manifest (minus a few exceptions here ), but the explicit intent of the translation remains untouched.
We are going to transfer any necessary transfer from the manifest. But how do we know if a receiver is implied? Is there a general rule?
Here is an example of the translations that we register in the manifest. Should we only look at the action tag and see if it has a white list to keep it in the manifest?
<receiver android:name=".receiver.ImageBroadcastReceiver" android:enabled="true" > <intent-filter> <action android:name="android.hardware.action.NEW_PICTURE" /> <category android:name="android.intent.category.OPENABLE" /> <data android:mimeType="image/*" /> </intent-filter> </receiver> <receiver android:name=".receiver.InstallReferrerReceiver" android:exported="true"> <intent-filter> <action android:name="com.android.vending.INSTALL_REFERRER" /> </intent-filter> </receiver> <receiver android:name=".receiver.JoinEventReceiver" > <intent-filter> <action android:name="JOIN_ACTION" /> <action android:name="CANCEL_ACTION" /> <action android:name="DECLINE_ACTION" /> </intent-filter> </receiver>
For example, the intent "com.android.vending.INSTALL_REFERRER" is not white. Should we register it in Activity? If it werenโt, it was never fired, as during registration, the application is already installed? This is what confuses me when trying to figure out if the broadcast receiver is implicit or explicit, as I thought I only needed to check this action tag.
android android-intent android-manifest android-broadcast android-8.0-oreo
Gauthier
source share