I'd like to display additional information about caller from LDAP server when receiving phone call.
I learned I can't display Dialog
(and Toast is too short) from Service
. So I created special Activity
for this, but sometimes, the call Activity
is started after my Activity
, and it hides it. So, is there some way to reliably start my LDAP Activity
after system call Activity
is displayed?
If there isn't, I guess I'll do something like application Adaffix (see the second screenshot) is doing and will display it as overlay. I learned it's done using WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY
, but from the code I've seen, I have no clue how to use it. If someone can provide me code to display white rectangle with some text on top of the screen, I'll be very glad.
Or is there some other "proper" way to do it? I have no intentions to implementing my own call screen!