Skip to main content
New Participant
June 15, 2021

Bluetooth scan and permissions. BLE and the CompanionDeviceManager

Hi,

I am working on a project that connects  BLE Gatt devices ( heart rate, FTMS, Power, speed, cadence profiles... ) to Oculus Quest headsets .

I've been using the alpha and release channels to regularly upload and distribute the app with a test user group.

I got this error message the last time that I uploaded  a build : " DO not use location permissions to scan for nearby Bluetooth devices. Update your app to use the COmpanionDeviceManager API to make and manage connections...." 

I need help using the CompanionDeviceManager API on Oculus Quest. I've been trying A LOT of things and permissions, but I can't make it work on Quest. The device scan seems to silently fail.

I made it work seamlessly on my Android phone ( the COmpanionDeviceManager API  BLE device scan & bonding ), but it doesn't work on Oculus Quest.

 

Also :  there are these 2 valid permissions in the Quest VRC checks,  BLUETOTH_SCAN and BLUETOOTH_CONNECT . The problem is that they don't seem to be accepted by the Oculus Quest headset.

They are permissions introduced with Android S.

https://developer.oculus.com/distribute/vrc-quest-security-2/

 

Please help,

I would really need to talk with someone from Oculus about the BLE support.

 

 

 

 

 

    22 replies

    New Participant
    June 29, 2022

    babichev i couldnt find any example so i tried to write to the Oculus dev and they didnt have any example too.. so i gave up on bt and completed the same thing via wifi

    Participant
    July 1, 2022

    You can find example in Android documentation here: https://developer.android.com/guide/topics/connectivity/companion-device-pairing#java  I just wanted to see if this really works on Quest before deep diving into JNI. But no one seems to have tried it.

    New Participant
    August 30, 2022

    Question, can we release to the Oculus/Meta store if we just let the user connect to the BLE device via the native BLE Menu in OS and then have our App check to see if any of the connected device match one we are looking for? 

    In that way all we need is the Bluetooth_Connect permission and then we don't need Location Services or Scan permission or even to do a scan in App. We wouldn't even need to use the Companion Device manager. 

    New Participant
    September 27, 2023

    I'm also having problems with the following error when trying to upload to applab:


    Your manifest includes the following unsupported permissions: -
    android.permission.ACCESS_FINE_LOCATION -
    android.permission.ACCESS_BACKGROUND_LOCATION -
    android.permission.ACCESS_COARSE_LOCATION Do not use location permissions to scan for nearby Bluetooth devices. Update your app to use the CompanionDeviceManager API to make and manage connections instead of requesting these permissions.

     

    BLE permissions are essential for the app that I'm making. Could someone share instructions on how to implement and use the CompanionDeviceManager in Unity.

    esa08
    Participant
    October 27, 2023

    Hi Barrrt.. I have same issue, is this solved?

    Participant
    December 29, 2023

    if you made it this far, no. there is no tutorial or example, good luck, I'm fkd