Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent an app to show on recent application list on android kitkat 4.4.2

Tags:

android

list

line

I was just bored of iOS and I recently changed to Android. I have a Nexus 5 device, and I've just finished installing my favourite apps in my device.

One of those apps is Line, the famous communication app from naver. I installed it and I configured it with a passcode in order to secure access to it, so no one despite me could see the "confidential" conversations inside.

The problem is even if I have the passcode enabled on line, if someone presses the "Recent list applications" button, they can see perfectly a screenshot of Line with my last conversation, so anyone could see what I was doing in Line.

I made the same test on iPhone and .. surprise ... iOS is taking the snapshot AFTER the passcode screen is enabled, so anyone could see nothing. It seems that in Android the snapshot is taken BEFORE passcode screen is enabled so anyone could see what last line screen looks like :)

So, having read other threads on this forums, I'm supposed to have several ways to solve this:

  • Wait for LINE's company NAVER to add an option to prevent this app to show on recent app list (adding android:excludeFromRecents="true" on THEIR manifest) [that won't be soon]
  • Wait for LINE's company NAVER to force the snapshot after passcode screen is enabled [maybe soon but not in company'sroadmap]
  • Decompile apk and change manifest on my own - or use FLAG_SECURE - (I tried it but when I launch the new app it suddenly dies on startup with a message "Application stopped". I thing LINE's server verifies on startup that the client app is what is expected to be, comparing sizes or something else)

So I don't know more ways to get around this. Do you have any more idea? I'm stucked on it.

Thank you a lot.

like image 322
user3206268 Avatar asked Jan 17 '14 11:01

user3206268


People also ask

Is Android KitKat still supported?

As of October 2022, 1.39% of Android devices run KitKat. As of August 2022, it is the oldest Android version still supported by Google Play Services and is currently the minimum version to develop apps for the Google Play Store.


1 Answers

Detect when LINE has left foreground
Create a background service that detects if LINE is on foreground and when it leaves the foreground. (https://stackoverflow.com/a/14044662/1683141)

When line has left foreground, you should take action:
A. Stop the line app completely
OR
B. Open & "close" the line app so it will show a locked state in the multitask thumbnail

A possible way to accomplish situation B:

Optionally: detect which app the user has now opened and remember it

  1. Wait a few seconds and open the LINE app again after the user closed it (by intent for example)
  2. Now the LINE app will show the lock screen
  3. Now let the background service open the home screen (or make an intent to the remembered activity)
  4. Now the LINE app is back to the background and it will have a multitask-thumbnail showing the locked screen.

Ofcourse, this will create a loop, and this isn't a stable solution

-Option A is a relatively reliable, and a (in my opinion) good way to accomplish what you want: no one can see your secure chat. Disadvantage is that the application is now removed from multitasking.
-Option B is only an idea, but maybe, if it's done the right way, It could work.
Edit: Option A will not work. The application will not be removed from multitasking if the task is killed.

like image 126
Mdlc Avatar answered Oct 04 '22 23:10

Mdlc