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.
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" />