cancel
Showing results for 
Search instead for 
Did you mean: 

How to get GearVR model while initializing vrapi?

zproxy
Expert Protege
How to get GearVR model (or serial if any) while initializing vrapi while docked into headset?

4 REPLIES 4

zproxy
Expert Protege
why not. you should.

oculus_gabor
Protege
This information is available outside of the vr api.

The android system API already provides this information: https://developer.android.com/reference/android/os/Build.html#MODEL

Unity surfaces it: https://docs.unity3d.com/ScriptReference/SystemInfo-deviceModel.html

Unreal surfaces it: https://github.com/EpicGames/UnrealEngine/blob/8e4560b8c22b309e73ff0ce90377742c3dfe13cc/Engine/Source/Runtime/Core/Private/Android/AndroidMisc.cpp#L837

Do you have a specific use case that is not covered by the API's already in place?

zproxy
Expert Protege
gabor, the question is which gearvr device has been attached. 2015 or 2016 model for example.

zproxy
Expert Protege
        //9651  9675 I VRManagerGearVR: accessing calibration data for DISTORTION_MESH
//9262 9272 D VRSVC : (DistortionFileProvider.java:72) openAssetFile [Uri=content://com.samsung.android.hmt.vrsvc.distortion mode=r model=SM-R322]
//9262 9272 V VRSVC : (DistortionFileManager.java:152) wtkw [vr model=SM-R322 device=SM-G930V distortion=distortion/distortion_R322_S7Flat.bin]
//9262 9272 V VRSVC : (DistortionFileManager.java:52) yTqX [fileName=distortion/distortion_R322_S7Flat.bin]
//9262 9272 V VRSVC : (DistortionFileManager.java:181) yTqX [copyAssetToFile.. assetPath=distortion/distortion_R322_S7Flat.bin file=/data/user/0/com.samsung.android.hmt.vrsvc/cache/distortion/distortion_R322_S7Flat.bin overWrite=true]
//9262 9272 V VRSVC : (DistortionFileManager.java:186) yTqX [delete /data/user/0/com.samsung.android.hmt.vrsvc/cache/distortion/distortion_R322_S7Flat.bin]
VRSVC seems to know the model of the headset just fine.