D
D
Dariek2016-07-26 16:41:20
Android
Dariek, 2016-07-26 16:41:20

How to make kiosk mode for android 5?

In particular, hiding the bottom panel with system buttons is of most interest.
The code found on stackoverflow for android 5 unfortunately only leads to a blank screen:

Process proc = null;

        String ProcID = "79"; //HONEYCOMB AND OLDER

        if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH){
            ProcID = "42"; //ICS AND NEWER
        }

        try {
            proc = Runtime.getRuntime().exec(new String[] { "su", "-c", "service call activity "+ProcID+" s16 com.android.systemui" });
        } catch (Exception e) {
            e.printStackTrace();
        }
        try {
            proc.waitFor();
        } catch (Exception e) {        
            e.printStackTrace();
        }

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dariek, 2016-10-19
@Dariek

Root on the device is by itself.
As a result, changing the file build.prop helped the line qemu.hw.mainkeys=1 removes the panel with system buttons. Accordingly qemu.hw.mainkeys=0 returns.
In general, I don’t recommend doing this, and this is a piece-by-piece solution, but in my case this was exactly what was needed. It was required to prepare only two tablets. In general, it may be useful to someone.

L
lopatoid, 2016-08-04
@lopatoid

The device must be rooted.

P
Patrick Robinson, 2020-01-16
@Patrick231

Yes, I think lopatoid is right

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question