Android - Does Lollipop Screen pinning support multiple actions in one application?

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.

+4
source share
1 answer

The Android Lollipop screen snap function binds to a single task NOT a screen operation. Therefore, if your actions are in the same task, then yes, you can play / switch between actions in the pinning mode of the screen.

: https://developer.android.com/about/versions/android-5.0.html#Enterprise >

+5

All Articles