3

I'm taking lots of inspiration from app Go Locker and project LockScreenApp, to create a basic lockscreen app that displays various pictures, randomly picked from a folder on device storage. App is working fine. My event receiver receives ACTION_SCREEN_OFF event properly, kicking off my Activity, which is visible on front when screen is switched back on. I can swipe on my view to "unlock", works fine. So far so good.

Next step is to handle home Button. Now I know that onAttachedToWindow() of handling home Button press doesn't work with 4.X. I'm working with S2 (4.1.2).

Although, it definitely seem possible, as Go Locker does this (on the same device) flawlessly, without a single blink on the screen.

Initially I thought setting my app as default launcher might resolve this, but Go Locker doesn't do that. I can successfully continue using my Nova Launcher as my default launcher, yet Go Locker lockscreen successfully intercepts HOME key press and keep me on the lockscreen.

I tried intercepting onPause() & onStop events on myActivity, and kicking off another instance of myActivity` from there, but it doesn't work that way.

Go Locker seems to be doing something cleverer than that. Any idea how this can be achieved please?

Sufian
  • 6,405
  • 16
  • 66
  • 120
kaushal
  • 53
  • 4
  • Do you have a repo to share? I'm found the same problem over the internet but not a clue on how to solve... i'm thinking in try to replace the Keyguard Service, but i don't know if this approach will do the job. – matiasfha Aug 07 '14 at 13:28
  • By any chance did yo resolve this issue. I am struggling for almost a week to resolve this. There are many apps like SmartAppLock handling this flawlessly. Please advise if this issue is resolved for you. – Gaurav May 10 '15 at 10:43
  • Unfortunately no, not resolved :( – kaushal May 26 '15 at 09:52

0 Answers0