I am trying to add kiosk functionality to an Android app. I hope to use the Lollipop screen lock feature to automatically connect the application after it launches. The user interface of the application has been created with several different activities. I call startLockTask()once during the method onCreate()for the login operation. However, as soon as I move on to another action in the application, it will be disabled.
Do I need startLockTask()to call in all activities on time onCreate()/onResume()? This will lead to poor user experience, because when I click on the โAttached Screenโ button, it will be displayed every time I switch from one action to another in the application.
I am developing an application on Moto E (2nd Gene) running Android 5.0.2.
source
share