Marshmallow Permissions Unity

We are working with Unity3d to build a GPS app.
On an Android device with Marshmallow 6.0, it does not ask for any permissions at the time we install it. We have read that Marshmallow ask for them only at Run Time (https://developer.android.com/training/permissions/requesting.html), but we don´t know how to modify the AndroidManifest to do it properly. Is there an easy way to do it?

Upvotes: 0

Views: 598

Answers (1)

Programmer
Programmer

Reputation: 125435

This has been asked before. Please try to search the question before posting.

In Android 6.0 Marshmallow, Android permission is now asked when during run-time instead of install time. There is nothing you can do about that. Modifying the AndroidManifest won't solve the problem.

This is a bug that is now fixed in Unity 5.4.0B15.

Unity 5.4.0B15 Android Marshmallow - Fixed issues when querying for custom permissions.

Update to 5.4.0B15 or above to fix this problem.

The first time permission is asked, you get something like this

enter image description here

The second time, the player will have a chance to choose Never ask again.

enter image description here

The reason for this is to give the user complete control of which permission to allow and which ones to decline. For example, you can allow WiFi but reject Bluetooth unlike before, when you had to either allow every permission or reject all of them.

Upvotes: 1

Related Questions