Removing Full-Screen Intent Permission from Flutter Android

How to remove USE_FULL_SCREEN_INTENT permission so you can submit Flutter Android to Google Play Store

Today I’m trying to submit a new version of the Flutter Android app to Google Play Store. I didn’t put any new features, just some bug fixes. I didn’t even change the dependencies. Normally no issue whatsoever when I send it to the Google Play Store.

But, something unexpected happened. I got an error message from the Play Store with the following message.

Your app uses the USE_FULL_SCREEN_INTENT permission. From May 31, 2024, some apps may no longer be eligible to have this permission pre-granted at install. Apps that aren’t eligible or approved for this, must request permission from the user to launch an activity with full-screen intent. If the permission isn’t granted and you don’t check for this, your app will crash when full-screen intent is being used.

Well, this is unusual.

I didn’t use that permission in my app. So it’s probably coming from one of my dependencies.

Luckily, it’s an easy fix.

To fix this issue, we just need to add a few lines to the AndroidManifest.xml file.

You can find the manifest file at android/app/src/main/AndroidManifest.xml. Here’s what the content of my manifest file looks like before I fix the issue.

1<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
3    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
4    <uses-permission android:name="android.permission.INTERNET"/>
5
6    <application>
7        <!-- ... -->
8    </application>
9</manifest>
AndroidManifest.xml

Now let’s fix it by adding some configuration lines.

The first one is to add following snippet to manifest tag.

xmlns:tools="http://schemas.android.com/tools"

Then you also need to add the following user permission removal under the manifest tag.

<uses-permission
    android:name="android.permission.USE_FULL_SCREEN_INTENT"
    tools:node="remove" />

The final AndroidManifest.xml file will look something like the following snippet.

 1<manifest xmlns:android="http://schemas.android.com/apk/res/android"
 2          xmlns:tools="http://schemas.android.com/tools">
 3    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
 4    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
 5    <uses-permission android:name="android.permission.INTERNET"/>
 6    <uses-permission
 7        android:name="android.permission.USE_FULL_SCREEN_INTENT"
 8        tools:node="remove" />
 9
10    <application>
11        <!-- ... -->
12    </application>
13</manifest>
AndroidManifest.xml

Once you make the changes, update your app version, and republish to Google Play Store. This time it won’t have any issue!

Here’s a video to visualize how I made the fix.

That’s all I can show in this post. Thanks for reading and have a good day!

References