VR系列——Oculus Publishing文档:四、应用的Manifest要求

注意:在提交app应用之前需反复确认Manifest是否符合要求。在提交过程中,简单的Manifest错误通常会导致产品延迟发布。作为一个额外的预防措施,我们推荐在提交app应用之前先用提交校验器对其进行验证。

Unity应用的Manifest

用Unity提供的第一方VR支持库(Unity 5.1.1p1或更高版本)编译的程序,它的Manifest能够在编译过程中自动更新,以符合我们的需求(横向模式、VR模式等)。其他所有属性值,例如权限检查设置将不会被修改。不要把noHistory属性加入Manifest中。

这些Manifest的提交要求和其他文档中提到的研发要求不同,请务必对照下列规范,仔细检查你的Manifest文件。

  • app的包名必须写在标签的包属性中。包名必须要唯一。
  • Manifest的标签中必须包含android:installLocation=”internalOnly”。
  • Unity的开发人员:注意,除非安装路径Edit->Project Settings->Player->Configuration被设为Force Internal,否则这一属性值会被Unity覆盖。
  • versionName会展示在在应用商店中。
  • versionCode用于交付更新。该属性值必须是大于0的整数,并且随着后续版本的提交,数值应不断增大。如果你用Unity来构建app,你要在Unity中设置这一属性值,而不是在manifest文件中手动进行修改,否则会被Unity覆盖。
  • 所有VR APK相关的manifest文件中,元素必须要包含以下标签来实现VR模式的配置:
<meta-data android:name="com.samsung.android.vr.application.mode"
           android:value="vr_only"/>
  • 你必须根据下面的例子来构建main activity。特别要注意的是,main activity的Intent filter②要设置为android.intent.category.INFO,不能是普遍用的android.intent.category.LAUNCHER。这样能确保你的app只在Oculus Home显示,不会在手机的主菜单中启动。
<activity
    android:name="YOUR ACTIVITY"
    android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
    android:label="@string/app_name"
    android:launchMode="singleTask"
    android:screenOrientation="landscape"
    android:configChanges="screenSize|orientation|keyboardHidden|keyboard"
    android:excludeFromRecents="true">
    <intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.INFO" />
    </intent-filter>
</activity>
  • minSdkVersion和targetSdkVersion必须设为19。
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="19" />
  • app需要OpenGL ES的版本号,OpenGL ES 2.0对应的值为0x0002000,OpenGL ES 3.0对应的值为0x0003000。
<uses-feature android:glEsVersion="0x00030000" android:required="true" />
  • **重要:**app要指定下列权限,用来读取设备的透镜畸变信息:
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
  • 务必移除AndroidManifest.xml文件中多余的权限,只需包含app运行时必不可少的权限即可。权限许可会在用户安装app时显示,若那些不必要的权限过多可能会导致用户取消安装。

注意:不要把noHistory属性加入Manifest中。


原文如下

Note: Please be sure to review the manifest requirements before submitting your application. Simple manifest errors are a common cause of delays in the submission process. As an additional precaution, we recommend using our Submission Validator on your application before submitting.

Unity Application Manifests

The manifests of projects built with Unity’s first-party VR support enabled (available in Unity 5.1.1p1 and later) are automatically updated during build to meet our requirements (landscape orientation, vr_only, et cetera). All other values, such as Entitlement Check settings, will not be modified. Do not add the noHistory attribute to your manifest.

These manifest submission requirements differ from the development requirements described in our other documents. Please be sure to double-check your manifest against these specifications.

  • The manifest must contain the application’s package name in the tag’s package attribute. This package name must be unique.
  • The manifest must contain android:installLocation=”internalOnly” in the tag. Unity developers: note that this value will be overwritten by Unity unless Install Location in Edit > Project Settings > Player > Configuration is set to Force Internal.
  • versionName will be displayed on the Store.
  • versionCode will be used to deliver updates to users. This value must be an integer greater than 0, and must increment with subsequent revisions. If you’re using Unity to build your app, you should edit this value within Unity instead of manually modifying the manifest file, since Unity will overwrite it.
  • VR Mode must be properly configured by including the following tag in the < application > element in the manifest file of all VR APK files:
<meta-data android:name="com.samsung.android.vr.application.mode"
           android:value="vr_only"/>
  • You must structure your main activity as shown below. In particular, note that your main activity’s intent filter should be sent to android.intent.category.INFO instead of the more common android.intent.category.LAUNCHER. This is to ensure that your app only appears in Oculus Home and can’t be launched from the phone’s launcher.
<activity
    android:name="YOUR ACTIVITY"
    android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
    android:label="@string/app_name"
    android:launchMode="singleTask"
    android:screenOrientation="landscape"
    android:configChanges="screenSize|orientation|keyboardHidden|keyboard"
    android:excludeFromRecents="true">
    <intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.INFO" />
    </intent-filter>
</activity>
  • The minSdkVersion and targetSdkVersion must be set to 19.
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="19" />
  • The OpenGL ES version required by the application. It must be either 0x0002000 for OpenGL ES 2.0 or 0x0003000 for OpenGL ES 3.0.
<uses-feature android:glEsVersion="0x00030000" android:required="true" />
  • Important: applications are now required to specify the following permission, which is required for reading the appropriate lens distortion file for the device:
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
  • You must remove any unnecessary permissions from your AndroidManifest.xml file. Please be careful to only include permissions that are absolutely necessary for your app to function. These permissions are displayed to the user at installation and if they are overly broad, it may cause the user to cancel the install.

Note: You should not add the noHistory attribute to your manifest.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值