Home > Mobile >  How to get pop up window in part of phone like the image
How to get pop up window in part of phone like the image

Time:10-06

I am trying to make my own alarm app and want to have a partial view open up when an alarm activates no matter where in the phone I am at, like the image I am including. Can I please get some tips on how I would do this, do I start an activity through an intent with the alarm manager? Or can I just start a fragment? Also, how do I get it to just be the little window, I prefer that, and do not want to launch a full screen view. Apologies that I do not know much, I don't have anyone else to ask for advice. I am using kotlin, Thank you. enter image description here

CodePudding user response:

That's just a notification that has a button.

You'll find everything here: https://developer.android.com/training/notify-user/build-notification

To add a Button: https://developer.android.com/training/notify-user/build-notification#Actions

Just a hint: If you change the behaviour of your channel, clear your appdata or choose another id (Or even better: delete your channel via notificationManager if it's not needed anymore). Otherwise the changes will not be applied.

  • Related