2

Im trying to display activity with some information over the lockscreen in transparent mode. I have defined style:

<style name="Theme.Transparent" parent="android:Theme">
    <item name="android:windowIsTranslucent">true</item>
    <item name="android:windowBackground">@android:color/transparent</item>
    <item name="android:windowContentOverlay">@null</item>
    <item name="android:windowNoTitle">true</item>
    <item name="android:windowIsFloating">false</item>
    <item name="android:backgroundDimEnabled">false</item>
</style>

and used it in the manifest file. When activity is created:

@Override
    protected void onCreate(Bundle savedInstanceState) {        
        super.onCreate(savedInstanceState);
        getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);
//        getWindow().addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD);
        getWindow().addFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.onlockscreen);
}

The activity is created well but I can see window that is UNDER the lockscreen... when I dismiss my activity pressing back button lockscreen apears and I can unlock device.

My goal is to see my activity over the lock screen and see that lock screen in background of that activity... Can anyone point me what Im doing wrong? Or is it a bug in android, that I see windows that are under lock screen when showing activity over lock screen in transparent mode?

mdml
  • 22,442
  • 8
  • 58
  • 66
luki
  • 21
  • 1
  • 3
  • possible duplicate of [Activity in front of Lockscreen](http://stackoverflow.com/questions/15259892/activity-in-front-of-lockscreen) – AlikElzin-kilaka May 31 '14 at 09:16

0 Answers0