0

I want to make a fullscreen app, so question is how to enable a immersive mode. I tried this:

v.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE
                    | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
                    | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
                    | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
                    | View.SYSTEM_UI_FLAG_FULLSCREEN
                    | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);

But the problem is that touching anywhere on the screen the navigation buttons appear, and what I am looking for is a full-time full-screen, I want that the only way to exit from the app will be turning off the tablet (it is for the menu of a restaurant).
Thanks in advance.

Eloy Fernández Franco
  • 1,350
  • 1
  • 24
  • 47
  • As someone who's looked into this issue before, I can tell you that implementing true kiosk mode is a massive pain and generally device-dependent. If you're running Android L, though, you can try activating screen pinning as described http://android.stackexchange.com/questions/85013/how-to-enable-task-locking-in-android-5-0-production-devices. – Matter Cat Apr 09 '15 at 07:51
  • ummm.... and is there any way to execute the kiosk mode without use the android 5.0 API?? For example, the games, doesn´t use something similar as a kiosk mode to play them?? Thank @Matter_Cat – Eloy Fernández Franco Apr 09 '15 at 08:16
  • There are ways to block out parts of it, but it's difficult to completely lock down a screen. You can get rid of the top bar (created by swiping down from the top) fairly easily. You can set your app to the default app on the device to take care of the home button. Depending on your device, you may be able to take the Recent Apps button out. It's not clean, though, and you may end up with an incomplete solution. Still want to try it? – Matter Cat Apr 09 '15 at 08:23
  • Thanks @Matter_Cat, I think that even though it is not clean, I`ll try. Because the kiosk mode is only available on 5.0 version (or above)(that was what I understood), and maybe we have this option, I don´t know... It depends about the cost of tablets with this SO. One more question, what do you want to say with "set your app to the default app on the device to take care of the home button"?? – Eloy Fernández Franco Apr 10 '15 at 12:55
  • Ok!!! I found here http://stackoverflow.com/questions/4783960/call-method-when-home-button-pressed-on-android how to open my app with the home button, I only need to take the Recent Apps button out... Thanks @MatterCat – Eloy Fernández Franco Apr 10 '15 at 13:33
  • Is your tablet rooted? – Aaron Gillion Apr 14 '15 at 23:25
  • Hello @AroonGillion. I could root it, if it was necessary. Thank you. – Eloy Fernández Franco Apr 15 '15 at 06:19
  • Hello. @AaronGillion, I though you were going to propose somethig.... I can root the tablet, but I don't know what else do. – Eloy Fernández Franco Apr 16 '15 at 21:01
  • If you root, you can force-stop SystemUI.apk in order to remove navigation bar. – Aaron Gillion Apr 16 '15 at 22:29

1 Answers1

0
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"

inside the activity tag of your manifestfile can make your activity fullscreen

Karthika PB
  • 1,373
  • 9
  • 16