Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hiding the System UI on Lollipop

I have a kiosk mode application which hides all traces of the System UI (Notification bar and navigation buttons). On versions of Android pre-Lollipop the following works fine (as root):

service call activity 42 s16 com.android.systemui

In Lollipop however, this makes the screen completely black as well as hiding the System UI. For this reason it cannot be used.

Does anyone know of a workaround for this?

I have tried the Device Owner/Admin solution for Screen Pinning, but unfortunately this is not acceptable because it does not hide the System UI entirely, but leaves the back button visible when swiping form the bottom of the screen.

like image 883
tristan2468 Avatar asked Jan 14 '15 11:01

tristan2468


People also ask

What happens if system UI has stopped?

The Android "System UI Has Stopped" error is usually caused by an app that's trying to access a resource it doesn't have permission for. When this happens, the app will crash and you'll see the error message on your screen. Some users have noticed that the problem occurs after an Android OS update.

Why is system UI on my phone?

System UI is a type of user interface that enables users to control and customize their displays independent of an app. System UI is an Android application that enables display customization independent of third-party apps. In even simpler terms, everything you see on Android that is not an app is System UI.

Can I change system UI Android?

While you can modify the Android source code to customize the System UI, doing so makes it more difficult and complex to apply future Android updates.


1 Answers

If the device is rooted you could disable the systemui pm disable-user com.android.systemui and then the device-owner method works fine.

This method should not be used if the device runs other apps, because if your app crashes the systemui might be disabled and the user can't interact with the device.

<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
&device-owner package="com.mycompany" name="*mycompany" />
like image 105
Mark Avatar answered Sep 20 '22 15:09

Mark