Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
oculus-papa's avatar
oculus-papa
Explorer
4 years ago

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

 

 

 

6 Replies

Replies have been turned off for this discussion
  •  You ever figure out how to do this? I'm having permission issues with the microphone as well.

  • 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.

     

    • oculus-papa's avatar
      oculus-papa
      Explorer

      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.

      • jibbs63's avatar
        jibbs63
        Protege

        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"/>

  • 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.