0

Similar questions already exist here, but although what I'm trying to do is quite similar it isn't the same, so please don't mark as a duplicate.

I am building an app to run on a Kiosk therefore I want to prevent users from exiting the app, in order to do this I will need to hide both the status and navigation bars.

I am able to do both but there is always a method which the user can bring them back in which is not the desirable outcome.

So far I have:

  • Read on/trialled the properties that can be used in setSystemUiVisibility().
  • Experimented with InputMethodManager
  • Looked into different full screen options Immersive, Sticky Immersive and Lean back.
  • Looked into properties that can be set in the manifest file.
  • Browsed through the documentation.
  • Googled for similar issues.

The Ideal solution would be one where I don't have to repeat the same setup for every single activity..

Aboudi
  • 308
  • 1
  • 2
  • 17
  • I have a feeling that this is something that Android won't allow for considering this isn't the intended use case? – Aboudi Sep 16 '18 at 08:25
  • 1
    Have you tried the Android Management API? See this [similar question](https://stackoverflow.com/questions/49339245). – Fred Sep 17 '18 at 22:57
  • @Fred I am already in the process of giving a shot, seems like the easiest route to go down, I don't like the Ideal of using a third part EMM or creating my own Controller. – Aboudi Sep 18 '18 at 17:59

1 Answers1

0

Seems likes the behaviour/functionality i am looking for is covered by what Android refers to as a Dedicated Device:

Dedicated devices

As an IT admin, you can configure Android 6.0 Marshmallow and later devices as dedicated devices (previously called corporate-owned, single-use, or COSU devices). These are Android devices used for a single purpose, such as digital signage, ticket printing, point of sale, or inventory management. To use Android devices as dedicated devices, you need to develop Android apps that your customers can manage.

Your customers can configure dedicated devices:

  • To lock a single application to the screen, and hide the Home and Recents buttons to prevent users from escaping the app.
  • To allow multiple applications to appear on the screen, such as a library kiosk with a catalog app and web browser.

Therefore it would be best to utilise this considering it designed for this specific purpose rather than trying to emulate/mimic such behaviour, which so far does not seem that possible anyways.

Community
  • 1
  • 1
Aboudi
  • 308
  • 1
  • 2
  • 17