1

I am developing an Android app for my organization, which will not be available on the Play Store. The app will only be installed on company-owned devices. I want the app to hide the navigation "home" and "recent apps" buttons as soon as it starts, so that the user cannot exit the app.

I initially set the app as a device owner using ADB, but this approach is not feasible as a laptop may not always be available. I also tried running ADB shell commands from within the app, but that method did not work. Is there a way to set the app as a device owner without relying on ADB, or is there a different approach to hide the navigation buttons when the app starts?

1
  • for same reasons you should also hide/lock notifications tray. afaik what you want to achieve is possible only with some EMM system probably... adb way is just for testing purposes Commented Jan 10, 2024 at 13:46

1 Answer 1

0

Just leave your application in full screen mode as documented in this documentation -> Android Full Screen

Or can you make this -> https://stackoverflow.com/a/51655122/9130794

Sign up to request clarification or add additional context in comments.

2 Comments

op said "so that the user cannot exit the app" - your resolution makes these buttons just hide but well-known gesture (swipe from bottom) will reveal them...
Sorry but I'm sure you can't do this by code, maybe there is a way to do this as a user of the device but automatically through code, I'm sure you can't do this as it would be a huge security hole considering that any troll app could do this and ruin the cell phone.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.