How to remove added permission due to Google Fitness API 7.5.0

After updating my-play-services-fitness api from 7.0.0 to 7.5.0, I noticed that when I switch to loading a new assembly in the PlayStore, it tells me that I am adding a new resolution and 2 new functions. I didn’t do it! What the heck.

+6
source share
1 answer

After some research to identify the culprit, it was actually a service-fitness-game: 7.5.0, which was to blame. By including this in your project ( compile 'com.google.android.gms:play-services-fitness:7.5.0' ) and compiling it, you enter <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/> into your AndroidManifest.xml. So the PlayStore is correct, you are asking for new permissions and features. You can confirm this by checking the build / intermediaries / manifestests / full / [debug | release] /AndroidManifest.xml. There you will see a new resolution. To remove this, simply add <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" tools:node="remove" /> to your own manifest and it will be removed during the manifest merge process. You will crash if / when you use the Fitness API, which requires this permission, but if you can guarantee that you will not use it, then you will receive it.

+7
source

Source: https://habr.com/ru/post/989045/


All Articles