cancel
Showing results for 
Search instead for 
Did you mean: 

APK getting rejected android.permission.READ_PHONE_STATE

tharun.cto
Honored Guest

Hi ,

 

I have been working with Immerse and Quest 2 for a while. Whenever I enable the voice feature through Gradle (Custom main grade template & Custom Base Gradle Template). Apk getting rejected and showing error stating three permissions CAMERA,  READ PHONE STATE and RECORD AUDIO needs to be removed.I have followed the below documentation.

 

 https://docs.immerse.io/docs/gradle-template-unity-20203

 

The voice works fine when I publish from unity3D to Quest 2 via cable. But when I tried to upload the apk via oculus HUB/ Oculus developer portal store. Its showing error stating below permission needs to be removed to get it uploaded.

 

<uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
    <uses-permission android:name="android.permission.BLUETOOTH" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE"
        android:maxSdkVersion="22" />
 
All these are unity3D generated permissions based on the Gradles I have selected and the changes I have made as per above immerse documentation. Even if I change that manually. it gets overwritten manually every time I publish. 
 
As these are autogenerated files. Even if I make changes to the XML and remove those permissions .its getting overwritten.i Tried removing this comment. Still its getting overwritten.i even tried to export it as Android project and do changes in those manifest files. But once I hit build all XML files gets re-generated and all the permission are added to the XML files.
 
<?xml version="1.0" encoding="utf-8"?>
<!-- GENERATED BY UNITY. REMOVE THIS COMMENT TO PREVENT OVERWRITING WHEN EXPORTING AGAIN —>
 
 
I could see 3 Android Manifest files created in side Temp>gradleout>launcher>build>intermediates>merged_manifests>release
Temp>gradleout>launcher>build>intermediates>bundle_manifest>release?processReleaseManifest?budle-manifest
Temp>gradleout>launcher>build>intermediates>instant_app_manifest>release
 
Immerse Support was not helpful in this case. Either this should be resolved by Oculus or Unity3D.
0 REPLIES 0