I’m building an Android app that displays a custom UI when there’s an incoming call.
Currently, I handle it like this:
If overlay permission is granted → show a Service with overlay (SYSTEM_ALERT_WINDOW) Dialog like trucaller. This part is working fine. If overlay permission is not granted → fallback to a Notification + Activity (but this behaves like a normal screen, not a pop-up on top of other apps or lockscreen).
The issue:
Apps like Truecaller and similar dialer apps can still show a full incoming call screen (pop-up) above all apps without asking for overlay permission, or there is no overlay present in the phone. My activity just stays inside my app and doesn’t float on top the same way.
My questions:
How does Truecaller achieve this effect? Is this possible in normal apps, or is it limited to: Default dialer role (using RoleManager)? Special OEM/system privileges? Some other trick like TYPE_APPLICATION_OVERLAY or lockscreen visibility flags?
Any guidance, official references, or sample implementations would be super helpful.
What I’ve tried:
Foreground service with SYSTEM_ALERT_WINDOW. Notification → PendingIntent → Activity. Lock screen flags (FLAG_SHOW_WHEN_LOCKED, FLAG_TURN_SCREEN_ON).
But none behave like Truecaller’s pop-up without overlay.
there is a special feature in OS called call screening - those dedicated permissions may allow your app to reject calls, also pop up with some info or decision dialog, when call incoming. thats a specific usecase and dedicated service for such feature only ("filtering" calls)