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!!

Did it work for anybody? I tried adding it to my build, but still getting the following message when trying publishing to Google Play:

"You should remove your app’s location permissions request if your target audience only includes children under 13

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" /> 
            
            ]],
        },

        usesFeatures =
        {

            { name="android.hardware.location", required=false },
            { name="android.hardware.location.gps", required=false },
        },

	  minSdkVersion = "16",
      usesPermissions =
      {
         "android.permission.INTERNET",
         "android.permission.ACCESS_NETWORK_STATE",
         "android.permission.READ_PHONE_STATE",
		 "android.permission.GET_ACCOUNTS",  
         "android.permission.WRITE_EXTERNAL_STORAGE",
         
      },

        applicationChildElements =
        { [[
                <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID"
                    android:value="ca-app-pub-4759143856974907~4646335757"/>
            ]],
        },


   }

Yes, this worked for me. If you’ve uploaded to multiple tracks, you could be still seeing the warning from those. Replace them in all tracks.

Yes! it worked! thanks, but now on the moment of publishing I get an error as the app includes SDKs that doesn’t comply with the designed for families policy.

“Additionally, apps that solely target children must not contain any SDKs that are not approved for use in child-directed services, including ads SDKs”

I have tried using just ONLY the following plugins with no luck:

       ['plugin.appodeal.base'] = { publisherId = 'com.coronalabs' },
       ['plugin.appodeal.GoogleAdMob'] = { publisherId = 'com.coronalabs' },

Has anybody been able to publish an app targeted for children with ads? Using just the basic Google Admob plugin just gives me a far too low CPM (less that 1€)

Cool, I’m glad the permissions removal worked. The family app thing is another topic. You may want to search the forum for it. I know I’ve seen it come up several times in the past.

Sounds like your implementation is suboptimal. I use only unity ads and get ~$14 ww.

If you have enough installs then you really need to look into a waterfall setup.

What is “ww”?

World wide I think.

My issue comes with this coppa Compliant Policy, as the SDKs used needs to be certified with it to be approved by Google Play to publish an app aimed to children.

Supposedly Appodeal complies with it, on build.settings I just enable the following:

       ['plugin.appodeal.beta.base'] = { publisherId = 'com.coronalabs' },
       ['plugin.appodeal.beta.GoogleAdMob'] = { publisherId = 'com.coronalabs' },

But still get the apk rejected.

You should really start a new topic for this issue since it’s unrelated, and people that have dealt with it will be more likely to see it with the proper topic/title.

Also, it looks like you’re trying to use the beta version of appodeal which is not recommended.

Stable plugins is 2.11 for both Android and iOS. Beta plugin is not recommended to use and contains legacy version