How to change Android thumbnail to protect sensitive data - android

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:
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
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!

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

Related

Android - How to make an app displayed in a small screen while the rest of screen is still visible and clickable

I have a request to reduce my app screen size and the rest of the screen space are still visible and clickable for user.
It means when my app is running, user can click some icons or buttons outside of my application.
What I found are using such as Dialogs or Multiple Fragments. However, those solutions are useful when all are in your main activity. But in my case, the rest of the screen is from Home screen or other screens, not from my app screen.
Could someone have an idea for this kind of concept?
Here is my request concept image
Searching from internet
You don't need to do anything for this. Android supports splitt screen since Android 7.0.
Alternatively you can enable Picture-In-Picture mode for your app which is supported since Android 8.

Check if Android is presenting its screen

Does anybody know if there is a generic way to check if the screen is currently being presented, e.g. via Miracast, Chromecast or any other app?
My app runs in the background and shows notifications every now and then. I'd like to avoid that while the screen is visible to others.

Does Android take a screenshot if the current Activity gets backgrounded (like iOS does)?

On iOS if you press the home button of the device, iOS takes a screenshot of the current app screen. When switching back to the app it then shows that screen and while the screen is shown it really loads the actual app state. The increases perceived performance.
The screenshot however can contain sensitive information (think of a banking app for instance). As the screenshot is saved unencrypted, some iOS apps remove sensitive information from the screen as soon as the app as backgrounded.
Does Android have a similar mechanism? If yes: how to prevent it or work around it?
Android doesn't do that. The application is still in memory but might be killed later. In that case everything will be restored with no screenshot taken by the system.
The only case where you want to hide sensitive information is when the user holds home button to show all running applications. You can hide the content of your activity where card details are entered by adding the following line in onCreate:
getWindow().setFlags(LayoutParams.FLAG_SECURE, LayoutParams.FLAG_SECURE);

Implementing a Lock Screen widget on the Home Screen - Android?

So, a few users have been asking me if I could make a home screen widget that launches my app..
Due to sensitive content, I've made a simple "Enter the password" splash screen. If the pin is correct the user gets access..
I've been getting complaints that it's a little slow and annoying to enter that every single time.
Majority of the requests I'm getting are relating to accessing the app quickly from the home screen itself. Using the simple shortcut icon is literally the same thing, since it will again open up the password screen..so I need something different.
So I need to open the app from the home screen, using a widget. I need the opening process to be say under 3 seconds or so... and I need to confirm the identity of the user.
What I'm thinking is a Lock Screen, or Pin screen widget.
Is there a way to replicate the Android Lock Screen inside a widget ? ... Remember, I need it on the home screen...
I think a 3X3 grid widget should do....
But there's absolutely no mention anywhere on how to do this... Is it possible? If so, how?
I want exact same functionality, the user can say, set a lock screen combination inside the app, disable the pin entering splash screen, put up the widget - and open the app from there.
Again, there's no mention anywhere of anything relating to this.
So, Any ideas on where I can get more help? Or how I might go about accomplishing this ?

How to Create 'how to use' screen (like Go launcher) for the first launch of app (Android)

I just want to add a screen help just like that one is in Go Launcher. The screen just loads in first time the app started in phone and with low opacity guides user to how to use that application with arrows and texts that notice.
You can save a flag in your app prefernces.
When your app starts the first time, set the flag and save it in the preferences. On startup check this flag and you can decide to show or hide your screen.
Some nice tutorials:
http://www.vogella.de/articles/Android/article.html

Categories

Resources