I have an android app which is voip app. When some one call we show a caller screen. This works fine but on some redmi device(Note 7 pro) the caller screen doesn't come if device is locked ie it only play sound.
On debugging I found I need to enable "Show on Lock Screen" permission for the device. Once I enable it it start working as expected. My issue is, I want to improve UI experience by checking this permission at run-time programmatically but unfortunately I am not able to find any thing which can allow me to check this. Is it possible on Redmi device?
You can try below code, it may help you to solve problem.