Log in or register to post comments

Android Software button backlight turn off automatically.

January 15, 2015 - 7:20am #1

Hi,

I have checked three app on Android (Nexus 5)

  1. A new Unity pure project and run on Android.
  2. Vuforia Android Sample package (https://developer.vuforia.com/resources/sample-apps/features#sampleAppModal)
  3. Vuforia Unity Sample package

Only "Vuforia Unity Sample package" makes Software buttons (BACK, HOME, MENU) turn off backlight automatically.

Though those button still work when user touch them, they are dark and invisible, so that user might not be aware to use them.
Please help find out whether there is any configuration inside Vuforia Unity package cause the issue, and suggest a solution to make it work as normal Android app.

Attached two screenshots.

  • android sample - good - backlight of buttons are ON.
  • sample_unity_package - bad - backlight of buttons are OFF.

Thanks
Jack

AttachmentSize
Image icon android_sample.jpg661.36 KB
Image icon sample_unity_package.jpg534.63 KB

Android Software button backlight turn off automatically.

January 20, 2015 - 10:59pm #10

Thank you for finding out the specific setting that matters.

So the formal term of soft keys is "Navigation bar".
I tried to add the code to remove SYSTEM_UI_FLAG_LOW_PROFILE, and it worked.

mUnityPlayer.setOnSystemUiVisibilityChangeListener(
                new View.OnSystemUiVisibilityChangeListener() {
                    @Override
                    public void onSystemUiVisibilityChange(int visibility) {
                        Log.w(TAG, "Current visibility ="+visibility);
                        if (visibility!=0) {
                            mUnityPlayer.setSystemUiVisibility(0);
                        }
                    }
                }
        );

 

Android Software button backlight turn off automatically.

January 20, 2015 - 7:30pm #9

Ok, here's the way to reproduce in a native Android app:

1. Get instance of a visible View object
2. Call the following method of your view object:

view.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE);

API Reference: SYSTEM_UI_FLAG_LOW_PROFILE

 

Additionally, there's 2 bullet points on the this page to be aware of:

Android UI: Dimming the System Bars

Note: Using SYSTEM_UI_FLAG_LOW_PROFILE in a native Android app works as expected for both the Nexus 5 (5.0.1) and the Galaxy S4 (4.4.4), but it appears that a different technique is being used in the Vuforia Unity project since the behavior on those same handsets differs.

Android Software button backlight turn off automatically.

January 20, 2015 - 6:56pm #8

I was able to reproduce the nav-button "shrink to dots" issue on a Nexus 5 (5.0.1) device. When running a Vuforia Unity project I saw that the nav buttons (Back, Home, Overview) will shrink to dots. The issue persists in non-QCAR scenes if there's other QCAR elements in your project. Unity projects without Vuforia don't experience the issue.

I did find mention of the behaviour on Google's site:

"If you don't use these buttons often, they may shrink to dots or fade away, depending on the current app. To bring them back, touch their location on your device."

https://support.google.com/nexus/answer/6073614?hl=en

I did a bit of troubleshooting, but haven't found cause of this behavior. Seems like it is something that could be triggered from native Android with right config settings. There apears to be a number of ways to modify the nav bar.

http://developer.android.com/design/patterns/fullscreen.html

https://developer.android.com/training/system-ui/navigation.html

 

Android Software button backlight turn off automatically.

January 19, 2015 - 7:37pm #7

OK. It seems Samsung device overrides normal behavior of backlight contorl of soft key.
Is it possible you get some other Android phone?
I will later to test one Samsung device too.

I tried to remove 
<uses-permission android:name="android.permission.WAKE_LOCK" />
from the Manifest.xml of my app.
The problem still exists

Also note I am using a android project have several Android Activity, and only the one Activity using QCAR unity extension always automatically turn off backlight of soft key.

Android Software button backlight turn off automatically.

January 19, 2015 - 6:46pm #6

In my tests, the native sample respects the 6 second time-out within the settings and the backlight turns off shortly after starting the app. The Unity sample briefly turns off button backlight during startup, but then turns them back on for duration of app. When looking at Manifest.xml, I see that Unity version has android.permission.WAKE_LOCK whereas the native version doesn't. That might explain why the backlight for the buttons stays on in my testing of the Unity sample app.

 

Android Software button backlight turn off automatically.

January 19, 2015 - 6:15pm #5

All my devices don't have such configuration "Touch key light duration" in Display menu of System Setting.
That seems only Samsung devices have it.

As I mentioned, on my same device, two different sample apps from your web (Android native sample and Unity extenstion sample) have different behaviors.
I would expect some configuration in the app makes the difference.

Please let me know if you still have difficulty seeing the same problem at your side.

Android Software button backlight turn off automatically.

January 19, 2015 - 5:23pm #4

What is your "Touch key light duration" set to in your settings? On a Galaxy S4 in the Display options, I see options for 1.5 seconds, 6 seconds, Always off, Always on.

Android Software button backlight turn off automatically.

January 19, 2015 - 5:07pm #3

We have at least three devices having the same issue.

  1. Nexus 5 (Android 5.0.1)
  2. HTC M8 (Android 4.4.4)
  3. HTC Desire 816 (Android 4.4.2)

Sample app:

https://developer.vuforia.com/resources/sample-apps/features#sampleAppModal
I downloaded the two samples last week. (see attached web page snapshot)

Here is the link of the apk file which I built with Unity 4.6

You can install it directly to test on your device.
https://www.dropbox.com/s/knuon02yflc15zj/QCARSampleImageTarget.apk?dl=0

 

AttachmentSize
Image icon download_sample.png213.07 KB

Android Software button backlight turn off automatically.

January 19, 2015 - 4:30pm #2

I ran a Unity Vuforia sample app project on a 4.4.4 device and the backlit buttons stay lit. Can you provide the Android version and model # of your device?

https://developer.vuforia.com/forum/device-support/how-report-device-issue

Also, which native Vuforia sample and which Unity sample were you testing with?

 

Log in or register to post comments