Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change Android thumbnail to protect sensitive data

Our Android app may present sensitive data and we wish to hide it when the app is not in use - Android is taking a snapshot of the app and displays it in the overview screen. At the same time we want to enable the user to take screen shots of the app when using it. We already checked following options:

  1. Using FLAG_SECURE - Answers the need to hide the app in the overview screen but completely blocks the user from taking any screen shot of the app
  2. Using onPause to change the activity content. Specifically we tried to show there the splash screen. We do see the splash screen appears when the app is minimizing, but the thumbnail presents the app before the splash appeared, meaning this is too late.

Any idea how we can hide/change the activity before the app moves to the background and still keep the print screen ability when the user is using the app?

Here are some links about the issue - all are only partial to this question:

  • How do I prevent Android taking a screenshot when my app goes to the background?
  • Hide a view before onStop?

Thanks!

like image 968
SBStack Avatar asked Feb 20 '15 15:02

SBStack


People also ask

How can sensitive data like contacts or access to the camera or other sensors be secured in the world of mobile apps?

How can sensitive data like contacts or access to the camera (or other sensors) be secured in the world of mobile apps? Access to a user's data or sensors is restricted by a permissions system.


1 Answers

Is removing the app from recent apps completely an option? Then set android:excludeFromRecent to true for the activity.

like image 87
Micky Avatar answered Nov 10 '22 13:11

Micky