You need to set the android:exported="true"
or "false"
on every activity, services, or broadcast receiver that using any intent-filter
. Please note, if you have multiple dependencies, and in these dependencies if they have their own activity, services, or broadcast receiver, we also need to add these android:exported
also on each of it.
But obviously, some dependencies may be not yet updated to comply with this one. so for now we can solve it by adding it in our own app Manifest.
to do this:
1. Check for merged manifest
First build the app, and then check for the merged manifest on the build folder. This usually on directory ./build/app/intermediates/merged_manifest/debug/out/AndroidManifest.xml
Open it, and find any tag <intent-filter>
on this file. and note the activity, service or broadcast class name. foe example:
<receiver
android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver" >
<intent-filter>
....
</intent-filter>
</receiver>
2. Modify our app Manifest.
Open your project app manifest, and add tools namespace on the manifest tag. xmlns:tools="http://schemas.android.com/tools"
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.app"
xmlns:tools="http://schemas.android.com/tools">
Then add these class on the manifest with the additional attribute android:exported="false"
and make sure to add tools:node="merge"
on it also. For example:
<receiver
android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver"
android:exported="false"
tools:node="merge" />
you dont need to add the other attribute or intent filter on your Project Manifest, since its already added on the plugins Manifest file. you only need to add these exported and tools:node="merge" to make the manifest attributes and value to be merged.
Then Lastly, run it locally first and make sure all of the Activity/services/broadcast receiver with intent-filter is having these attributes (NOTE: tools:node
attribute will be not present on the merged Manifest.).
FlautoBackgroundAudioService
requires theexported
flag. you can manually add it if this is coming from a library.