CustomPhoneDialer icon indicating copy to clipboard operation
CustomPhoneDialer copied to clipboard

Does not work when screen is off

Open gadgetreviews opened this issue 6 years ago • 2 comments

I managed to write a code to replace default phone app as explained in this repository. It is working only when screen is turned on. If screen is turned off, I can only hear ring tone, screen does not turn on. If I turn on screen manually, I can't see any call interface (not mine or not system default phone app. So I can't handle answer that call). How can I turn on screen when phone rings? I've tried several solutions about how to turn on screen, but no one is working in this case.

Any suggestions?

gadgetreviews avatar Dec 21 '19 13:12 gadgetreviews

    getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED
            | WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD
            | WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON
            | WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON);

copy this in CallActivity

multimediaixd avatar May 15 '20 14:05 multimediaixd

not working in Xiaomi devices.

sumitsonawane avatar Oct 06 '20 05:10 sumitsonawane