您的位置:首页 > 移动开发 > Unity3D

Unity 2018.3 AndroidManifest.xml

2019-03-31 09:53 31 查看

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>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: