Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incoming Call FullScreen Intent On A Cordova Activity #1689

Open
KyleKernanRepo opened this issue Dec 18, 2023 · 2 comments
Open

Incoming Call FullScreen Intent On A Cordova Activity #1689

KyleKernanRepo opened this issue Dec 18, 2023 · 2 comments

Comments

@KyleKernanRepo
Copy link

Bug Report

Problem

What is expected to happen?

What does actually happen?

Information

We currently have an app that receives an incoming call notification by receiving a full-screen intent. When the intent comes through we are passing the app as an activity to load. When the app has been loaded already by the user, the full-screen intent works as intended and we receive the incoming call. If the app is not loaded by the user or the system restarts the service in the background the UI does not display correctly. The sound notification comes through and we can hear the ringing, but the phone does not wake up or display the incoming call UI screen. We are passing a Cordova activity to the fullscreen intent, but it only works correctly when the app is loaded previously by the user. The debug logs show that JS is loading but the UI doesn’t actually load on the phone during the lock screen, the phone needs to be unlocked manually in order for the UI to display.

Environment, Platform, Device

Version information

Device: Samsung S23 Running Android 13
Cordova Version: [email protected]
IDE: Android Studio

Checklist

  • [ x ] I searched for existing GitHub issues
  • [ x ] I updated all Cordova tooling to most recent version
  • [ x ] I included all the necessary information above
@breautek breautek transferred this issue from apache/cordova Dec 30, 2023
@parveshneedhoo
Copy link

@KyleKernanRepo I'm experiencing the same issue. Have you found a solution for it or a workaround (besides opening the app beforehand)?

@KyleKernanRepo
Copy link
Author

@parveshneedhoo Yes the solution I found was you need to set your flags within the onCreate() as well as onNewIntent().

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants