2

I want to create an activity in front of the lockscreen. I don't want to skip the keyguard completely. I tryed it with the TYPE_SYSTEM_OVERLAY flag but there I can't handel any events. It works with FLAG_SHOW_WHEN_LOCKED but then there is a black background and i want it like on this picture:

An Activity without black background and event handling http://s1.directupload.net/images/130306/sctc586t.jpg

It would be nice if it is like TYPE_SYSTEM_OVERLAY but with event handling. Is that possible? I read that it is not possible with TYPE_SYSTEM_OVERLAY to get any Events but is there maybe another option to set an activity in front of the lockscreen? Maybe with root rights? It should look like it is in the picture.

Cilenco
  • 6,951
  • 17
  • 72
  • 152
  • possible duplicate of [Android Lock Screen Widget](http://stackoverflow.com/questions/4116001/android-lock-screen-widget) – Peter O. Mar 10 '13 at 03:15
  • This is a little different than an Android lockscreen widget. I think this question is describing similar functionality to the lockscreen option available in in Facebook Home. – ZenBalance Jul 11 '13 at 21:26

1 Answers1

0

To avoid black background try a translucent theme. At your manifest (activity or application) use android:theme="android:style/Theme.Translucent"

There is also a way to create widgets for lock screen of some devices from different manufactures, as far as I know HTC developer page has such a tool, but I have never tested and I am afraid that works only on sense devices.

If you are only interested for a devices you can also look at your manufactures developer page!

Edit:

Other related sites:

  1. Android Lock Screen Widget
  2. Features of 4.2: http://developer.android.com/about/versions/android-4.2.html#Lockscreen
Community
  • 1
  • 1
madlymad
  • 6,367
  • 6
  • 37
  • 68
  • If I use a translusent theme is it possible to click through it and unlock the phone without hideing the activity? – Cilenco Mar 07 '13 at 07:44
  • I do not think that this could happen... At least inside an app a translucent splash screen or activity does not allow you to click below it. It seems that an activity handles its own clicks and not "super" them to the system! – madlymad Mar 07 '13 at 09:44
  • hmmm... okay. Is there maybe an other FLAG or something where I can put an activity direcly on the lockscreen and can handle touch events? – Cilenco Mar 07 '13 at 10:29
  • i added some related links – madlymad Mar 07 '13 at 10:36