Forum Discussion
AnAerVR
4 years agoExplorer
How to get hardware information from Quest 2 such as serial number or controllers battery level?
Hey,
I'm working on a VR game using Unity and the Quest 2 headset. I'd like to get in-app access to the battery level of each device (headset, left controller, right controller) independently.
I managed to get acces to the headset's battery level using Unity's built-in SystemInfo.batteryLevel (OVR.batteryLevel is flagged as obsolete and doesn't work), but I can't find a way to get access the the battery level of the controllers. OVRInput.GetControllerBatteryPercentRemaining() always returns 0 regardless of the argument I use.
Additionally, I would like to get access to further headset-related information such as serial number or nickname. So far, none of the answers I've found online have helped; apparently this used to work but now always returns "unknown":
AndroidJavaObject jo = new("android.os.Build");
float serialNumber = jo.GetStatic<string>("SERIAL");
Documentation is sparce, so I'm kinda stumped. Assistance would be greatly appreciated. Cheers!
2 Replies
Replies have been turned off for this discussion
Not actually tried this on Quest, but it works on Android: Unity - Scripting API: SystemInfo.deviceUniqueIdentifier
Alternatively, who know what this returns on Quest. Might be worth a try: https://forum.unity.com/threads/how-to-get-imei-of-android-phone-in-unity.538135/#post-3547395
- Aliaksei.LuferauExplorer
Hello AnAerVR, Did you manage to get Oculus Quest 2 controllers battery level? Thanks!
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 2 years ago