Search Unity

Question Runtime Permissions Problem

Discussion in 'Editor & General Support' started by gaglabs, Jan 31, 2021.

  1. gaglabs

    gaglabs

    Joined:
    Oct 17, 2019
    Posts:
    185
    I have an issue with Runtime Permissions being asked on start of my app. I put in the manifest to not ask for permissions using -

    Code (CSharp):
    1.  
    2. <meta-data
    3. android:name="unityplayer.SkipPermissionsDialog"
    4. android:value="true"
    5. />
    6.  
    But it still asks for Camera Permissions and such before the user even uses the camera. This in return crashes my app and continues to do so every time the user launches it, if theyve denied these permissions. If they allow all permissions then it works fine. But the app itself shouldn't be asking for permission for anything until such permission is needed.
     
  2. gaglabs

    gaglabs

    Joined:
    Oct 17, 2019
    Posts:
    185
    This is also my current Manifest file

    Code (CSharp):
    1. <?xml version="1.0" encoding="utf-8"?>
    2. <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    3. xmlns:tools="http://schemas.android.com/tools"
    4. package="************************"
    5. android:versionCode="1"
    6. android:versionName="1.0">
    7.   <application android:label="@string/app_name" android:icon="@drawable/app_icon">
    8.     <!-- The MessagingUnityPlayerActivity is a class that extends
    9.          UnityPlayerActivity to work around a known issue when receiving
    10.          notification data payloads in the background. -->
    11.     <activity android:name="com.google.firebase.MessagingUnityPlayerActivity" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
    12.       <intent-filter>
    13.         <action android:name="android.intent.action.MAIN" />
    14.         <category android:name="android.intent.category.LAUNCHER" />
    15.       </intent-filter>
    16.       <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
    17.       <meta-data android:name="unityplayer.SkipPermissionsDialog" android:value="true"/> // Added the value here
    18.     </activity>
    19.     <service android:name="com.google.firebase.messaging.MessageForwardingService" android:exported="false" />
    20.  
    21.  
    22.   </application>
    23.   <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    24.   <uses-permission android:name="com.android.vending.BILLING"/>
    25. </manifest>