0

Is there anyway to achieve background screen caching in android?In one my applications , we need to achieve this for security purposes. Question may look simple but I am new to Android. Please help.

The following link explains to do so in iOS.

https://www.virtuesecurity.com/blog/ios-background-screen-caching/

2 Answers2

1

You can just override the onPause() method and for example hide sensitive information. The onPause method is called right before the activity goes to background.

Sandro Machado
  • 9,921
  • 4
  • 36
  • 57
0

We tried to put custom image when app goes to background by using method onCreateThumbnail() as per documentation, this method will get invoked when app goes in background but it is never happened and there is open issue regarding the same https://code.google.com/p/android/issues/detail?id=29370 . We have to use FLAG.SECURE and we have this already implemented.

Link1: How do I prevent Android taking a screenshot when my app goes to the background?

Link2: How to change the snapshot shown by recent apps list?

Bot none of them worked for me.!

Community
  • 1
  • 1