How to make an Android app a device owner without using ADB and hide navigation buttons programmatically

144 Views Asked by At

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

There are 1 best solutions below

2
Tales Born On

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