question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[nativescript/geolocation] Android bundle upload checks ACCESS_BACKGROUND_LOCATION

See original GitHub issue

I recently integrated this plugin into my app to check the current user location on user behalf (user actively presses a button for fetching the location). No geolocation.watchLocation(...) has been added, I just use geolocation.getCurrentLocation(...). When building my app and uploading the aab to the PlayStore it told me that the app permission changes for ACCESS_BACKGROUND_LOCATION.

I haven’t added this permission in AndroidManifest.xml nor do I plan to use this feature. I just use ACCESS_COARSE_LOCATION and ACCESS_FINE_LOCATION for fetching current user location.

Could you please give me a tipp on how I can get rid of this message when uploading the bundle?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
NathanWalkercommented, Aug 30, 2021

Hi @oliverqn we’ll look at removing that in next patch and just noting in README - however you can clear it right now by doing this:

  1. npm pack @nativescript/geolocation

This will create a .tgz file. Double click to unpack and navigate in the ‘package’.

  1. open the platforms/android/AndroidManifest.xml And remove this line: https://github.com/NativeScript/plugins/blob/65846a30d08d27a463b6b3f3a818a7a3be32a3a2/packages/geolocation/platforms/android/AndroidManifest.xml#L4

  2. Then “npm pack” from inside the “package” folder. This will create another .tgz file. Drag it to the root of your project and switch your package.json to use it:

@nativescript/geolocation”: “file:nativescript-geolocation-7.2.1.tgz”

  1. then clean your project: “ns clean”

  2. now build and upload to store.

1reaction
chimmelbcommented, Sep 15, 2021

Just noting that this temp fix worked for me as well. Thank you for the good instructions. My app v1.3.2 on Aug 2 was fine, and with no AndroidManifest.xml changes the Sept 9 version was rejected. Google not taking ACCESS_BACKGROUND_LOCATION lightly, and flags it as sensitive (in web console, Policy -> App Content -> Sensitive App Permissions). Denied my release with it included, since not the main feature/purpose of the app.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Request location permissions - Android Developers
To determine which permissions the system has granted to your app, check the return value of your permissions request. You can use Jetpack...
Read more >
Access location in the background - Android Developers
Use the following checklist to identify potential location access logic in the background: In your app's manifest, check for the ...
Read more >
Upload your app to the Play Console - Android Developers
In the Play Console, you can use the app bundle explorer to see all APK artifacts that Google Play generates, inspect data such...
Read more >
bundletool - Android Developers
There are two ways you can test your app bundle: Use the bundletool command-line tool locally. Upload your bundle to the Play Console...
Read more >
Build and test your Android App Bundle
Then, upload your app bundle to the Play Console to test or ... that you want to test, check the box next to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found