Hello,
I want to use bluetooth in my Oculus Quest device so I need to include android.permission.BLUETOOTH permission in the .apk generated by Unity.
I included the AndroidManifest.xml file below in the …/MyProject/Assets/Plugins/Android/
<?xml version="1.0" encoding="utf-8"?>
The permissions ACCESS_COARSE_LOCATION and BLUETOOTH_ADMIN was included but not the BLUETOOTH permission.
Im using Oculus Plugin + Unity 2019.4.16f1
I tried with Unity versions 2019.3.2.f1, 2020.1.0f1, 2020.1.9f1. Same result. Not work.
I cant believe it. Any idea?
Thanks in advance!!
I’m having the same issue, have you found a work around??
It seems the problem is being caused by Oculus XR Plugin since version 1.5.0. The plugin is removing the BLUETOOTH permission from builds [Changelog | Oculus XR Plugin | 1.8.1][Android Permission is not include in final apk using Unity + Oculus Quest - Stack Overflow]
I guess there are two solutions:
- Downgrade to version 1.4.3
- Edit the
OculusBuildProcessor.cs
file found in Packages/Oculus XR Plugin/Editor and comment the line where the BLUETOOTH permission is removed.
The line in question is #434: RemoveNameValueElementInTag(manifestDoc, nodePath, "uses-permission", "android:name", "android.permission.BLUETOOTH");
3 Likes