0

Basically what's happening here is an overlay being displayed on any screen (meaning it is not a dialog, nor a notification, nor a ui service)

The closest I can think of is a custom toast message, where toasts usually lasts on any screen at any app, but toasts can't last more than 3.5 seconds as shown here

I need to do something like this, since I need the user to be alerted about an incoming order that he needs to be responding to.

Anything close is welcomed

Ahmad Hamwi
  • 204
  • 2
  • 10

1 Answers1

3

read about SYSTEM_ALERT_WINDOW permission. it will allow you to drawn on screen on top on your/other apps

BUT afaik above perm will let you draw on top other apps, but not covering system GUI. on your GIF sticky widget with timer is drawn also on top of notifications, thats not possible in Android system even with SYSTEM_ALERT_WINDOW. so yet again Samsung (in fact any manufacturer) modified Android and adjusted to own purposes, made some new possibilities and gave proper permissions for own apps... and you won't use them as you don't know/have API and don't have privileges, which you can't even ask for

snachmsm
  • 17,866
  • 3
  • 32
  • 74
  • Thank you for the suggestion, I have seen alot of resourcing regarding this permission and ```TYPE_APPLICATION_OVERLAY``` and I'm defintely going to be following this. I actually do not care about drawing on top of system UI, I care about notifiying the user when he's outside of the app. Thank you so much again!! – Ahmad Hamwi Jun 06 '22 at 11:31