Search code examples
androidiosionic-frameworkwindows-phone

Prevent mobile app exit


I am developing an hybrid mobile application with the Ionic framework and I'd want that when you want to close the application or switch app you need to enter a password.

The idea is that the phone running the application will be accessible to other people and I want to prevent people to simply press the home button and access to the rest of the user's phone.

Is it possible with an hybrid app or with native app from the code (with special permissions) without having the user to configure something from the phone's settings ?


Solution

  • No, it's not possible. But the functionality is also present in Android. Check "Screen pinning" (Settings -> Security -> Screen pinning) and you will be able to "pin" your app.