Short version: How do you call Oculus' VrApi setSystemBrightness from within a UE4 GearVR game?
Long version: Our game's environments have a lot of variation in brightness. We need the dark areas for scary scenes. However, going too dark in GearVR can cause smearing. We've also noticed differences in default brightness and dark-area visual quality between S6, S7 and other phones. We want to control the screen brightness in our game so we can tune our visuals to a known brightness.
We tried setting it via Settings.System.putInt(getContentResolver(), Settings.System.SCREEN_BRIGHTNESS, 255), but this doesn't take effect until we exit the app. In conjunction with that, we tried setting it via WindowManager.LayoutParams, but in LogCat we can see VrApi kicking in immediately and resetting the brightness with a command it calls "setSystemBrightness".
If I go into the VR system menu by holding the back button, I can adjust the brightness slider. Looking back at LogCat, I see all the setSystemBrightness calls this generates. So the Oculus VrApi command seems like the thing to use.
Unfortunately, I looked into the interface to the VrApiShim and don't see that function, or anything referring to brightness.
So how can we adjust the screen brightness via our UE4 GearVR game?
@imperativity - thanks for the follow up! Could this be added to a future version of the API? Right now, users might experience excessive "black smear" in our title "Face Your Fears" based on their phone and brightness settings, but it won't be obvious to them why or how to fix it. We've already brightened the levels far beyond what our art director feels makes the best experience - on a bright phone they'll look washed out. If we could hook in to this existing brightness control, we could allow users to fine tune brightness in-game based on their device.