0

I want to show custom dialog as shown in image. The dialog must be center aligned. Which permission are needed, both in manifest and programmatically?

enter image description here

Junaid Khan
  • 315
  • 5
  • 16

1 Answers1

1

Top notification window in android is called Heads-up notification,

your question has been asked here(In order to use notification heads up):

How to Custom Heads-up notification layout?

and also you can check this link in order to use notifications pop up properly in different kinds of Android API:

android show notification with a popup on top of any application

But you can simply show your dialog through your service(For example your FCM service):

Show a Dialog when Firebase Notification is received and App is in the background

AMK
  • 662
  • 6
  • 16
  • How will I align this Custom Heads Up notification in center? – Junaid Khan Aug 17 '20 at 16:30
  • Oh ha! If you don't want to use heads-up notification, you can just simply show your dialog through your (For example) FCM service, when notification received, you just create an intent and show your dialog. You can search about showing a dialog via Service. – AMK Aug 17 '20 at 16:40