How to show the incoming call screen when the screen is locked?

后端 未结 1 953
春和景丽
春和景丽 2021-01-12 16:23

I\'m developing my custom calling app, like skype and I need to show \"incoming call\" screen to user, when I receive fcm message. I use full screen intent notification for

相关标签:
1条回答
  • 2021-01-12 17:05

    Add following code in your CallActivity:

    getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED| WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON|WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
    

    PS:It's java code,if you use kotlin then change it by yourself.

    0 讨论(0)
提交回复
热议问题