Can we do screen pinning of android lollipop device without user interaction

320 Views Asked by At

I am trying screen pinning in my app. But in lollipop device before screen pinning and unpinning its asking user interaction. If we click Ok then only screen pinning works.

Is there any way to remove user interaction dialog while pinning the screen?

1

There are 1 best solutions below

0
On

Yes, you can use Activity.startLockTask()