I am creating an application wherein I am having a lock screen which comes up whenever the application moves to the background.
I want that on pressing the recent apps, the screenshot of my application(or that activity) be avoided. One way is to use the "Secure Flag". But that would as well avoid taking screenshots in application which I don't want.
Hence, one way I was thinking is onStop() or onPause() of the activity(moving into the background), I start the lock screen activity which would ultimately result into the snapshot of the lock screen. But that does not seem to work.
Is there any other way for the same?
MainActivity extends LockActivity.
LockActivity has the lock code
Thanks in advance.