How to create lock screen notifications in my app?

639 Views Asked by At

I'm trying to create a custom notification in my android app with an image that will also be visible when the phone is locked.

Right now, Im building push notifications which are visible on the notification bar only, in which only my app icon is visible and on clicking which a certain pending intent is executed.

Is there a way through which i can show, my notifications with an image and a headline with it and also it gets visible on locked screen .

Also is there any widgets available or particular libraries through which i can implement my custom notifications?

1

There are 1 best solutions below

1
AudioBubble On

Try using alertdialog with a flag. The flag_show_when_locked is the thing you trying to do I suppose. Please refer to this answer here.