04-30-2021 11:25 PM
05-14-2021 10:45 AM - edited 05-14-2021 10:46 AM
The Documentation here is horrible for unreal devs I only managed to figure out how to fix one
under advanced APK android
set an extra tag for application
android:allowBackup="False"
05-17-2021 06:21 AM - edited 05-17-2021 06:21 AM
Thanks for the reply. Some errors are gone but these are still available.
ERROR: Validation identified the following errors:
GLES version not specified (android:glEsVersion in AndroidManifest.xml). GLES version of 2.0 or greater should be used.
NOTE:
Your manifest includes the following potentially dangerous permissions:
- android.permission.READ_EXTERNAL_STORAGE
- android.permission.ACCESS_MEDIA_LOCATION
Please remove these permissions if they are not needed by your application. If they are needed, you must include justification in the “Notes for the Reviewer” field when submitting your application for review. Failure to provide justification will result in the rejection of your application.
05-18-2021 05:54 PM
Have the same problem!
I spent last 4 days and nights with this issues 😞
I will very appritiated if you have some solutions
05-21-2021 08:02 AM
in android, if something is not marked specifically true or false it will still have a default value. Try manually telling the advanced section that those params are false?
05-21-2021 03:50 PM
hello, you need 3 things:
1. have a `Build\Android\ManifestRequirementsOverride.txt` like the following (you need to adjust the value for your sdk version and glES versions):
<uses-sdk android:minSdkVersion="25" android:targetSdkVersion="25" />
<uses-feature android:name="android.hardware.vr.headtracking" android:required="true" android:version="1" />
<uses-feature android:glEsVersion="0x00030002" android:required="true" />
<supports-gl-texture android:name="GL_KHR_texture_compression_astc_ldr" />
<uses-feature android:name="android.hardware.usb.host" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.oculus.permission.HAND_TRACKING" />
<uses-feature android:name="oculus.software.handtracking" android:required="false" />
2. have a `Source\[your project]\AndroidSanitizePermissions_UPL.xml` with the following 'removePermission' tags (adjust for your own needs):
<?xml version="1.0" encoding="utf-8"?>
<root xmlns:android="http://schemas.android.com/apk/res/android">
<androidManifestUpdates>
<removePermission android:name="android.permission.ACCESS_NETWORK_STATE" />
<removePermission android:name="android.permission.ACCESS_WIFI_STATE" />
<removePermission android:name="android.permission.READ_PHONE_STATE" />
<removePermission android:name="com.android.vending.CHECK_LICENSE" />
<removePermission android:name="android.permission.GET_ACCOUNTS" />
<removePermission android:name="android.permission.ACCESS_MEDIA_LOCATION" />
<removePermission android:name="android.permission.READ_EXTERNAL_STORAGE" />
</androidManifestUpdates>
</root>
3. add the following lines into `Source\[your project]\[your project].Build.cs` :
using System.IO;
--
var manifest_file = Path.Combine(ModuleDirectory, "AndroidSanitizePermissions_UPL.xml");
AdditionalPropertiesForReceipt.Add(new ReceiptProperty("AndroidPlugin", manifest_file));
Hope this helps.
05-22-2021 05:59 AM
Thanks, that is super useful!
Is it possible to add the removePermission tags via the Project Settings > Android > Advanced APK Packaging section? It would be great to control these settings from one single place.
05-28-2021 06:13 AM
BTW, you'll need to update that suggestion.
warning CS0618: 'UnrealBuildTool.ModuleRules.ReceiptPropertyList.Add(UnrealBuildTool.ReceiptProperty)' is obsolete: 'Constructing a ReceiptProperty object is deprecated. Call ReceiptProperties.Add() with the path to the file to stage.'
05-28-2021 06:23 AM - edited 05-28-2021 06:23 AM
ok so according to the forums:
"
Looking at the API, it seems they've just made a new two argument add function, which internally constructs the ReceiptProperty. So all you should need to do is drop the ReceptProperty construction, giving the arguments you gave to the construction to the Add function instead.
i.e. AdditionalPropertiesForReceipt.Add("AndroidPlugin", Path.Combine(PluginPath, "AndroidManifest_UPL.xml")); "
Just gave this a try myself with your fix and it compiles, so the answer looks more like this:
var manifest_file = Path.Combine(ModuleDirectory, "AndroidSanitizePermissions_UPL.xml");
AdditionalPropertiesForReceipt.Add("AndroidPlugin", manifest_file);
05-28-2021 11:33 AM - edited 05-28-2021 11:33 AM
this is all you should have to do gets rid of two of the three warnings online works with all warnings but this will ensure security and passing oculus standards