-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[docs] SDK 50 - Android 14 Foreground service permission requirements #26846
Comments
An update: Doing a manual upload on Play console of the AAB artefact allows me to fill in the new foreground permission details in relation to the new release. I haven't tried submitting to the Play store from EAS again after that, but I suspect that would remove the block from the Google API as well. It did make the new "Foreground service permissions" option show up on the Play console under "App content". |
what details required to fill in ? |
They want you to declare what foreground permissions you're using, in my case with expo-location it was It's a bit of a hassle, but the review part went quite quickly, within the hour. I don't think they even watched they video according to analytics on YouTube. |
Same thing happened for me. I got the error on EAS submit, so then I uploaded the AAB manually to the play store. It stopped me and said I had to declare foreground services and provided a link to App Content. It gave a few choices for which permissions my app used (the app asks the user for location on one screen which I use expo-location for), and then they ask for a link to a video showing the functionality in the app. I uploaded an unlisted youtube and put in that link, and that was it. |
We get this as well. Tried uploading the aab manually and got the same app content link to fill in. |
Is there any recommendation on what permissions need to be added for Android 14 using getCurrentPositionAsync or @Kudo Apologies for roping you into this discussion, but it seems like this issue may carry a bit more weight than a simple documentation change as it appears others may be plague with this issue and get rejected by Google as they migrate to Expo 50. Do you have any insight into this matter? Update |
This kind of seems wrong and should be something we should be able to turn off. The reason being, Google wants this if we're tracking location when the app is not in use, which in my use case, isn't tracked. This is not meant to be for applications that use location when a user has it opened for typical geo located events. Hopefully this can be corrected so we can properly use EAS to submit builds. I'm going to upload a video, but I know what might happen is that they might not like that our app is tracking in the background when it isn't. This also concerns me if this is an iOS issue or not, because they really don't like location tracking in the background either. (Thanks Uber) |
I'm currently experiencing the same issue. After upgrading to Expo50, I manually uploaded the EAS build file to the Google Play Console. Additionally, I recorded the parts of my app that use maps and uploaded the video to YouTube. However, Google rejected it. Probably because my app doesn't use maps in the background, and the video did not include proof of that. Currently, with the version upgraded to Expo50, it's not possible to bypass the expo-location issue. Has anyone been able to do it? Is there any good solution? |
I'm having the same issue where the app got rejected after upgrading to expo 50 because of the added foreground service permission. Like above, I got the error, so I submitted the additional data with a video showing how the location is used (not using it in the background), but got rejected. Would love to hear if anyone got a workaround for this. |
Just an idea but has anyone tried blocking the permission in the app config? I'm guessing Google is only scanning the manifest for this, and if the permission is not there perhaps the app would pass like previously. Of course the would assume you don't need any background location. |
@robutler That seems to have worked. By blocking the permission in app.config.js I was able to submit the Android build through the API again.
|
@robutler Blocking the permission in the app config did the trick for me, thanks! No error/warning regarding this permission when preparing the release and Google just accepted my new release 🥳, AND the location service worked as expected in the app 😌 |
Thank you for filing this issue! |
hey folks, we are investigating what the best solution is here that we can introduce as a patch in sdk 50 without breaking anybody's apps. for now, blocking the foreground service permission is a good workaround. we'll keep you update |
# Why See: #26846 tl;dr: Google Play now requires declaring usage of foreground service permissions, and you must include a video to demonstrate the usage. # How - Removed the permission from **AndroidManifest.xml** so it is not added by default. I chose this approach over adding the permission to the block list in the config plugin, because this may impact apps that use the permission elsewhere! This would be very confusing if it were to impact someone. The tradeoff is that if someone is using expo-location in a bare app (without CNG) and did not add the permissions as stated in the README, but rather depended on the foreground service permission being implicitly added via the library **AndroidManifest.xml**, then updating to a new expo-location version would lead to this permission being missing. - Updated Android permissions data using @byCedric's scripts, which I published as an npm package and added as a script here to make it a bit easier in the future (`yarn permissions-sync-android` in docs). - [x] Backport docs changes to SDK 50 if we decide to cherrypick this change # Test Plan @alanjhughes is going to verify that leaving out these permissions will have no unintended side effects. # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.dev and README.md). - [x] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) - [x] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin).
See: #26846 tl;dr: Google Play now requires declaring usage of foreground service permissions, and you must include a video to demonstrate the usage. - Removed the permission from **AndroidManifest.xml** so it is not added by default. I chose this approach over adding the permission to the block list in the config plugin, because this may impact apps that use the permission elsewhere! This would be very confusing if it were to impact someone. The tradeoff is that if someone is using expo-location in a bare app (without CNG) and did not add the permissions as stated in the README, but rather depended on the foreground service permission being implicitly added via the library **AndroidManifest.xml**, then updating to a new expo-location version would lead to this permission being missing. - Updated Android permissions data using @byCedric's scripts, which I published as an npm package and added as a script here to make it a bit easier in the future (`yarn permissions-sync-android` in docs). - [x] Backport docs changes to SDK 50 if we decide to cherrypick this change @alanjhughes is going to verify that leaving out these permissions will have no unintended side effects. - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.dev and README.md). - [x] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) - [x] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin).
docs are updated, and the foreground service permission is disabled by default in expo-location@16.5.4. |
@brentvatne probably related: I'm getting this
error. Our app hasn't changed and the only thing we did was updating to SDK 50. We don't use the foreground location service explicitly, so the only thing I can think of is that Android 14 (SDK34) included some changes that makes it so the app tries to use it underneath? I've tried blocking the permission and I'm on the latest version of Before this, I didn't have any issues without that permission. App was being built and submitted, and worked as expected. |
@alterx - are you getting this error when attempting to get the current location with google maps? or by calling the expo-location api? it could be that google maps requires |
@brentvatne I'm getting at a point in the app where we request the permissions: it calls We've never needed the FOREGROUND_SERVICE_LOCATION permission for doing this before |
@alterx - that permissions was added in android 14. so you are saying that when you call |
@brentvatne yeah, I do get all the permission modals, but after a couple of seconds the app crashes. And upon further investigation, that's the error I'm seeing |
I was able to remove that part of the code and the app runs just fine, the map also runs fine so it's definitely not it. Update: It crashes right after calling |
@alterx - could you possibly create an issue with the full reproducible example an other info? it would be really helpful so we can get someone to quickly investigate this |
Sorry, I didn't get this notification earlier @brentvatne |
We're getting rejected for foreground service media projection as well... |
@emilnilimaa - can you provide more information on exactly what you are seeing? we don't add any permissions related to "foreground service media projection" in expo-location. you should narrow down which library this is coming from. |
@brentvatne Yeah its probably not expo-location, but we get the same type of rejection. I am not sure which lib it is coming from unfortunately, and we have plenty. But it started appearing at the same time as we received the location rejections... |
@emilnilimaa - you can search your node_modules for the permission string to see where it's coming from |
Which string should we search for? |
@emilnilimaa - whichever string google warned you about :) |
Well it only says this:
None of our code requests any such permission, so it has to be from some lib. But not sure what to search for. Searching for MEDIA_PROJECTION finds nothing. |
@efstathiosntonas Doing a search for that in the whole project only gets 1 hit, and thats the in the blockedPermissions I added in app.config.js |
In the app bundle explorer in google play i can see these under permissions: No idea what puts it in there... And they seem to go in there even if i add the blockedPermissions in the app.config.js |
I think @brteller is right here. There is no need to enable the permission if you're not using
https://support.google.com/googleplay/android-developer/answer/13392821?sjid=10403373841528529919-EU So nothing to do with simple foreground location permissions. |
Summary
With Expo SDK 50 being upgraded to Android SDK 34 (Android 14) there seems to be new foreground permission requirements for submitting an application to Android Play Store.
When trying to submit an application to the Play Store, built with SDK 50 through EAS, I'm getting stopped by the message:
My only guess is that this is somehow related to me using
expo-location
in my project, which adds a foreground service to the Android manifest.From what I can read in Google documentation here there should be a new section in the Play console where I can fill out additional details for Foregrounds services if I'm targeting Android 14 (which SDK 50 does).
However to me it seems like an chicken and the egg situation where I can't even submit my application to let Play console know that I'm targeting that Android version, because the submission process is blocking me, so that new section in the Play console isn't visible.
What is the recommended approach here for an Expo application? The documentation doesn't mention this case from what I can tell.
Link to the related docs page
https://docs.expo.dev/versions/latest/sdk/location/
Anything else?
No response
The text was updated successfully, but these errors were encountered: