On the latest version of Android app Facebook showed lock screen notification feature, like on this screenshot:
Did anyone try to implement this?
I know that It's simple to show Activity on top of lock screen, but unfortunately It doesn't work with translucent background. Basically it works but below our activity we see launcher screen, not lock screen (like lock screen in this case would be also transparent).
What I tried right now is:
getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON);
in my Activity.
Also I tried this example: https://gist.github.com/daichan4649/5352944
And as I described - everything works but no transparency.
From my observation Facebook uses theme:
@android:style/Theme.Translucent.NoTitleBar
and doesn't have permission:
<uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
Also I noticed that lock screen notification aquires touches so we cannot show notifications from statusbar by gesture.
Any ideas how to create that kind of notification before Android L release.