I am using Mark Wei's incredible library StandOut in my app:
What I am doing is very similar to TrueCaller App
Which is displaying my own view upon an incoming call.
This generally works great.
What is my problem?
On a very specific case:
KeyguardManager mKeyguardManager = (KeyguardManager)getSystemService(Activity.KEYGUARD_SERVICE);
mLock = mKeyguardManager.newKeyguardLock(KEYGUARD_SERVICE);
I have three suggestions for you to try, (not sure if they will work), but they are worth a try.
try to add these flags:
try to add a delay of let's say 2 seconds before you fire the StandOut window activity to make sure it is coming after the incoming call system screen (later, if this solves the issue, reduce the delay as much as possible).
Also found this answer here, not sure if you have access to the window properties, but saw this solution:
"We were also facing similar issue that the overlay was not displayed on a device with pin lock. The solution that worked for us is below:
mWindowManager = (WindowManager) getSystemService(WINDOW_SERVICE); mParams = new LayoutParams( LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT, LayoutParams.TYPE_SYSTEM_ERROR, LayoutParams.FLAG_NOT_FOCUSABLE, PixelFormat.TRANSLUCENT);
LayoutParams.TYPE_SYSTEM_ERRORthat made the difference."
The question that is similar: Pop up window over Android native incoming call screen like true caller Android app
Hope that something here is helpful to you, please update if solved.
UPDATE: This was solved the issue: (adding this):
Just make sure to add this before the layout is inflated, otherwise it will do nothing.