I have an application and I would like to block the exit of it to the people that doesn't know the application, how can i do it? I only found a function to block back button...
Thank you so much...
I have an application and I would like to block the exit of it to the people that doesn't know the application, how can i do it? I only found a function to block back button...
Thank you so much...
The closest thing I could find is called task locking or screen pinning on Android. It is only supported on Android Lollipop (5.0) or higher. The documentation has the following to say about this feature:
Android 5.0 introduces a new screen pinning API that lets you temporarily restrict users from leaving your task or being interrupted by notifications. This could be used, for example, if you are developing an education app to support high stakes assessment requirements on Android, or a single-purpose or kiosk application. Once your app activates screen pinning, users cannot see notifications, access other apps, or return to the home screen, until your app exits the mode.
There are some other questions asked regarding task locking, which you can find here and here.
I have been able to find a Cordova plugin for this here, however it doesn't seem to be very active at this moment in time.
Unfortunately, I don't think that this will actually solve your problem. From what I have been able (or unable) to find, this just doesn't seem to be possible. I think it is similar to closing an app on iOS with code, it is simply not allowed by the developers of the operating system.