Unity 2018.3 AndroidManifest.xml

Unity2018.3新增了Android6.0以上运行时权限获取

Unity AndroidManifest:https://docs.unity3d.com/Manual/android-manifest.html
请求权限:https://docs.unity3d.com/Manual/android-RequestingPermissions.html
新增API:https://docs.unity3d.com/ScriptReference/Android.Permission.html

在运行时请求权限:https://developer.android.com/training/permissions/requesting.html
正常权限和危险权限 :https://developer.android.com/guide/topics/security/permissions.html#normal-dangerous

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
	package="com.unity3d.player" 
	xmlns:tools="http://schemas.android.com/tools" 
	android:installLocation="preferExternal">
	
  <supports-screens android:smallScreens="true" 
	android:normalScreens="true" 
	android:largeScreens="true" 
	android:xlargeScreens="true" 
	android:anyDensity="true" />
  
  <application android:theme="@style/UnityThemeSelector" 
	android:icon="@drawable/app_icon" 
	android:label="@string/app_name" 
	android:isGame="true" 
	android:banner="@drawable/app_banner">
  
    <activity android:label="@string/app_name" 
		android:screenOrientation="fullSensor" 
		android:launchMode="singleTask" 
		android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale|layoutDirection|density" android:hardwareAccelerated="false" android:name="com.unity3d.player.UnityPlayerActivity">
      <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
        <category android:name="android.intent.category.LEANBACK_LAUNCHER" />
      </intent-filter>
      <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
    </activity>
	
  </application>
  
  <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
  <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
  <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
  
</manifest>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值