1

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!

Pitel
  • 5,334
  • 7
  • 45
  • 72

1 Answers1

0

What is happening here that call screen is overriding your Activity. you need to override the call screen.

You can override the call screen by putting delay before you start your activity.The delay will be around will be 500 ms and it can be less or greater that. You need to test it and check at which delay you are getting your desired result.

Vineet Shukla
  • 23,865
  • 10
  • 55
  • 63