7

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.

1 Answers1

1

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.

Community
  • 1
  • 1
Mdlc
  • 7,128
  • 12
  • 55
  • 98
  • Thanks mdlc! I'll give a try on option A. I'm not used to android service development yet so I think it will take a bit long to test, but as soon as I got results I will share them. Thanks! – user3206268 Jan 17 '14 at 15:01
  • mdlc, I'm not sure option A is gonna work. I'm afraid that recent list is going to show Line even if the app is closed or killed. In fact, it makes sense to keep Line on recent because actually it is, regardless app is closed or not. Are you sure option A is possible? – user3206268 Jan 18 '14 at 11:42
  • You can test if it works, by downloading a few task managers apps (or app killers etc) and see if there is an app that does empty the recent app list. – Mdlc Jan 19 '14 at 12:28
  • Already tested, killing the app does not empty it from recent app list. So it should be option B or decompile LINE app in order to modify the manifest.. (Already tried but for any reason when I try to execute the recompiled version of Line the app suddenly stops on startup). – user3206268 Jan 19 '14 at 13:28
  • Mdlc, I finally succeeded to decompile LINE to add some configuration on manifest file. Now LINE is not going to show more on recent list. Thank you! – user3206268 Jan 20 '14 at 20:20
  • The problem was that I didn't include in the recompiled apk the META-INF folder. Once the folder was in the apk, Line successfully started. And adding "android:excludeFromRecents="true"" did the job. Thank you again for spending your time with your help. – user3206268 Jan 20 '14 at 20:22