Skip to content
This repository has been archived by the owner on Nov 8, 2019. It is now read-only.

SDK doesn't expose user handedness preference for UX-C2 #571

Closed
rawnsley opened this issue Jun 30, 2018 · 5 comments
Closed

SDK doesn't expose user handedness preference for UX-C2 #571

rawnsley opened this issue Jun 30, 2018 · 5 comments

Comments

@rawnsley
Copy link

rawnsley commented Jun 30, 2018

The SDK doesn't seem to have a way to access UserPrefs.ControllerHandedness. It's only accessible from the NDK if you use GvrLayout, which has a GvrApi property. However, SDK apps use GvrView, which provides no such option.

This prevents us from complying with UX-C2: App uses hand preference

@sigmaxipi
Copy link

The ndk/base/GvrLayout.getGvrApi() method should be fully usable from a pure Java application without adding NDK support to your app. The ndk.base vs sdk.base is a historical artifact of how the APIs evolved rather than a limit on which functions can be used from what type of code.

@rawnsley
Copy link
Author

rawnsley commented Jul 3, 2018

@sigmaxipi I use GvrView rather than GvrLayout so I don't have that option. For example, how would you get GvrApi in the Treasure Hunt sample?

@sigmaxipi
Copy link

It looks like there is no easy way to get the GvrApi from GvrView. We'll add an API for this.

One short-term option is to switch from GvrView to GvrLayout like the videoplayer sample. The general code would be the same. The GvrView.StereoRenderer.onDrawEye code would be replaced with the VideoSceneRenderer.drawScene and VideoSceneRenderer.drawEye code since the NDK API is slightly lower level than the SDK API.

@rawnsley
Copy link
Author

Thanks @sigmaxipi . I'll try the suggested workaround.

@sigmaxipi
Copy link

This is fixed in v1.170

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants