Start a new topic

FEEDBACK: maxSdkVersion and permissions

Hi there,

We have recently added SmartAds to our Unity game (for iOS and Android). It mostly went okay except that it caused an issue with our (in-house) permissions plugin which is vital for the new 6.0+ permissions model.

The problem stems from the fact that a number of the provider plugins (AppLovin, Supersonic, Unity and Vungle to be precise) include this line in their manifest

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="18" />

Whilst I am sure this is valid for DDNA, it is not true for our game and the inclusion of the android:maxSdkVersion attribute gives the above definition a higher precedent when merging manifests.

This ultimately means that our definition is overwrriten by the above and leaves us unable to grant the permission on sdks > 18.

The fix was to update our own definition to the following:

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" tools:remove="android:maxSdkVersion" />

This tells the manifest merger to ignore any references to 
android:maxSdkVersion, allowing us to grant the permission as normal, and everything is working as expected again.

This was quite a difficult issue to track down and would benefit from some documentation/explanation to help elevate integration woes for future developers.

Hope this is helpful

Login or Signup to post a comment