Skip to main content
Participant
March 24, 2021

How to ask user for permissions? Getting PermissionDeniedAndDontAskAgain

Whether it's the microphone or Bluetooth, the user is never asked for permission and the permission is denied with don't ask again.  What do I need to do?

 

I have this in the AndroidManifest.xml

<meta-data android:name="unityplayer.SkipPermissionsDialog" android:value="false" />

 

Code:

https://paste.ee/p/XO9Nj

 

 

 

This topic has been closed for replies.

6 replies

Inspiring
November 1, 2021

 You ever figure out how to do this? I'm having permission issues with the microphone as well.

Up and Coming
November 3, 2021

so i dont know if this helps. But i also have problems with this. i found out (in case you dont know it).

That unity make an AndroidManifest and you by yourself can do this too. And unity combine these 2 manifests. So perhaps you edit your manifest at Assets/plugins/etc... and still unity combine the your manifest whitch is own. i found a good tool(after days)  to look into your androidmanifest and edit it. For this you have to decompile your build , then edit your androidmanifest, which is also possible in this tool and then the tool creates your new build and sign it.  Its the APK Editor Studio. https://qwertycube.com/apk-editor-studio/download/

And i can only say , if this ishelping you...support these poeople who created this editor. i mess 3-4 days with command konsole , java , apktool and others without success. And this tool was my saviour.

 

Participant
November 4, 2021

I was able to fix it by exporting the Unity project, editing the manifest and compiling with Android Studio.  Unity was interfering with the manifest.

Inspiring
November 21, 2021

what did you have to add to your manifest? I think mine already looks ok after decompiling it. I have

 

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-feature android:name="android.hardware.microphone" android:required="false"/>

and 

<meta-data android:name="unityplayer.SkipPermissionsDialog" android:value="false"/>

Up and Coming
November 4, 2021

thats good, this was what i first try. But the AndroidManifext was encryptet so i can´t edit it. with apktools i can, but at the recombile he does not compile the build.  than with the apk editor studio it works. but there may many ways. thanks anyway.