Skip to content

[Feature request]: Implement full screen intent android permission request #1338

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
2 of 4 tasks
dnkoulouris opened this issue Jun 18, 2024 · 10 comments
Closed
2 of 4 tasks
Labels
platform: android Issue is related to the Android platform.

Comments

@dnkoulouris
Copy link

Is there already an issue requesting this feature?

Please select affected platform(s)

  • Android
  • iOS
  • Windows

Use case

For apps that contain Videocalls or Alarms and target Android 14 and above, request for USE_FULL_SCREEN_INTENT permission is mandatory.
https://developer.android.com/reference/android/Manifest.permission#USE_FULL_SCREEN_INTENT
https://developer.android.com/training/permissions/requesting-special

Proposal

Add Permission.useFullScreenIntent

Specific requirements or considerations

No response

Additional information or context

No response

@mvanbeusekom
Copy link
Member

Hello @dnkoulouris,

I could be mistaken, however I think the USE_FULL_SCREEN_INTENT permission only needs to be added to the android/app/src/main/AndroidManifest.xml file to work.

I cannot find any documentation that this is a special permission and needs separate requesting and approval from the user. The Android documentation clearly mentions this is a "normal" permission.

Please let me know if you have any other sources that contradict me believes.

@mvanbeusekom mvanbeusekom added platform: android Issue is related to the Android platform. status: needs more info We need more information before we can continue work on this issue. labels Jun 18, 2024
@dnkoulouris
Copy link
Author

Hi @mvanbeusekom,

the problem is that in order for the app to be accepted at play store, the permission must be requested manually by the user. This is a new limitation of the Android 14. The other solution is to use platform channels and implement native code.

@github-actions github-actions bot removed the status: needs more info We need more information before we can continue work on this issue. label Jun 18, 2024
@mvanbeusekom
Copy link
Member

Can you provide additional documentation on how to do so?

I cannot find it in the two links you have send.

@dnkoulouris
Copy link
Author

dnkoulouris commented Jun 18, 2024

https://source.android.com/docs/core/permissions/fsi-limits

This is exactly the use case that I am facing.

@yahya489
Copy link

Google play store is asking developers to ask permission manually on android 14

USE_FULL_SCREEN_INTENT

@tommy-elliott-awh
Copy link

tommy-elliott-awh commented Jun 24, 2024

The requirement seems to me to be that ONLY if your app uses alarm clock or calling features, your app can be exempted from needing to manually request the permission from the user and can still be granted the permission automatically on app install - this is specified in a new App Content section in Google Developer Console. However, if your app isn't an alarm clock or calling app, you must request the permission from users for it to be granted. The app will crash if permission is not requested and granted before its use. The stated timeframe is May 31st 2024 for when this requirement change went into effect. The Learn more link goes to https://support.google.com/googleplay/android-developer/answer/14016515?hl=en which explains the requirements in more specific details.
Cropped Screenshot 2024-06-24 at 12 29 32 PM

@mvanbeusekom
Copy link
Member

I have been looking deeper into the documentation and it seems like Android will handle requesting the permission automatically if the `` key is part of the AndroidManifest.xml (from Android documentation):

Returns whether the calling app can send fullscreen intents.

From Android Build.VERSION_CODES.UPSIDE_DOWN_CAKE, apps may not have permission to use Manifest.permission.USE_FULL_SCREEN_INTENT. If permission is denied, notification will show up as an expanded heads up notification on lockscreen.

To request access, add the Manifest.permission.USE_FULL_SCREEN_INTENT permission to your manifest, and use Settings.ACTION_MANAGE_APP_USE_FULL_SCREEN_INTENT.

The only thing developers need to do is have some logic to ensure the permission is granted or not before executing the FSI intent. This seems something more suitable for plugins that actually execute full screen intents to build in and not something for the permission_handler to manage. Especially since there is no option to explicitly request the permission, which would result into strange behavior and unexpected results in the current API.

For now I will go ahead and close this issue. Please let me know if my assumptions regarding Android automatically requesting the permission are incorrect (including documentation) and I will be happy to reconsider.

@mvanbeusekom mvanbeusekom closed this as not planned Won't fix, can't repro, duplicate, stale Jun 25, 2024
@cshong87
Copy link

https://source.android.com/docs/core/permissions/fsi-limits

Documentation in above link clearly mention the following:

Upon installation, the Google Play Store revokes the full-screen intent (FSI) permission for apps that do not have calling or alarm functionalities.

This mean when installing apps that do not have calling or alarm functionalities, Google Play Store will revoke the full-screen intent permission.

So, I think you need to look into this.

@mil84
Copy link

mil84 commented Aug 19, 2024

@cshong87 is right.

This is an extremely confusing topic, because it's poorly documented and most explanations are ambiguous and/or contradicting - both by Google and most stackoverflow posts.

I just wasted the whole day on this stupid shit Google! This is how it works by my research:

  1. On Android 13 and less, all apps gets this permission granted automatically and that's it
  2. On Android 14, it get's complicated:
  • all apps will be automatically granted this permissions after the install
  • but immediately after install Google Play app will perform check on background (it checks the FULL_SCREEN_INTENT declaration form in Google Play) and if you declared your app is not alarm app, then FULL_SCREEN_INTENT permission gets literally immediately revokes this permission on background!

That sucks big time - because it's not only very confusing, but also makes it hard to test in debug during development - because as I've said, each and every app gets this permission automatically granted immediately after install - and since you usually test just a debug release, Google Play app is not performing the check of declaration form for FULL_SCREEN_INTENT, and hence not revoking the permission => you won't even notice you have a problem, until you see crashes in console.

Now what you need to do:

  1. Always declare FULL_SCREEN_INTENT in manifest (some people advise removing the permission from manifest and asking user manually, but this won't work)
  2. And then it depends what have you declared:
  • if you declared that your app is alarm/calendar app => you don't have to do anything (but this isn't as easy as it looks, google is being busy bee and likely will refuse your declaration, even for legit usecases it will simply claim that "it's not your app core feature" - happened to me with one of my alarm apps, it doesn't get more "core feature" than that lol)
  • if you declared your app is not an alarm/calendar app, then you must MANUALLY launch intent Settings.ACTION_MANAGE_APP_USE_FULL_SCREEN_INTENT opening phone settings screen to get this permission - or your app won't work in release mode. Don't get fooled that in debug mode you won't notice any issues

@patrick-billingsley
Copy link

Why was this closed? I cannot currently release my android app due to the new special permissions around USE_FULL_SCREEN_INTENT. I cannot remove this intent as my app has audio/video calling and crashes if I remove it. I can request the permission easily but currently have no way to check if it is already granted. This results in prompting the settings screen every time the app runs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: android Issue is related to the Android platform.
Projects
None yet
Development

No branches or pull requests

7 participants