1

I've been always curious to know how does lock screen notification view works on IMO messenger app? So I did some research and some articles were saying it's custom notification layout and part of RemoteView class. So I went through some quick tutorial and gave it a try but still I am not really sure whether I'm going right way.

So, finally I'm asking over here. Do you guys have any idea/suggestion to any library or any other way that I can come up with following outcome?

Desire



Result so far



Zip file- if you wanna take a look at the code
https://drive.google.com/file/d/0B9Y-jPBRm4zyTHZsT09kd3pUU0E/view?usp=sharing

Alex
  • 1,052
  • 1
  • 11
  • 22

1 Answers1

1

What you see in the navigation bar (just a back and home buttons) indicates that this is an Activity, placed above the lock screen with usage of the FLAG_SHOW_WHEN_LOCKED:

getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);

The styling where it looks like a dialog can be done by theming your Activity, probably using something like android:theme="@style/Theme.AppCompat.Dialog"

ianhanniballake
  • 191,609
  • 30
  • 470
  • 443