Removing permissions via build.settings?

Ok, so Google policy doesn’t allow you to use location services if it’s not part of your app’s main functionality. You can’t use it just for advertising purposes… however at least one of appodeal’s adapters is adding permissions. They suggest adding this to the manifest

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

Is it possible to do this just through build.settings?

I’ve tried a few things in userPermissions, usesFeatures, but haven’t been able to figure it out yet if it’s even possible.

It should be possible. I forget the name but it is one of the child element that can be added to the build setting. I am going to bed but if you dont figure it out but my morning I’ll show you.

1 Like

Hi, adding this to your build.settings will remove the permissions.

    android =
    {
        manifestChildElements = { [[ 
            <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" tools:node="remove" /> 
            <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" tools:node="remove" /> ]],
        },
    },
2 Likes

Great. Thank you!!