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

How to open MainActivity instead of UnlockScreenActivity #14

Closed
kimho opened this issue Aug 24, 2020 · 2 comments
Closed

How to open MainActivity instead of UnlockScreenActivity #14

kimho opened this issue Aug 24, 2020 · 2 comments

Comments

@kimho
Copy link

kimho commented Aug 24, 2020

In the current version, UnlockScreenActivity pops up when a call comes in while the app is in the background.
But I want the default MainActivity to be launched, not the UnlockScreenActivity.
In that case, it seems that the incoming screen can be customized with RN javascript code.
How can I make MainActivity run instead of UnlockScreenActivity?

@bkdev98
Copy link
Owner

bkdev98 commented Aug 24, 2020

This library is not designed for this behavior but I believed openAppFromHeadlessMode & backToForeground could also get the job done. So instead call IncomingCall.display you could use openAppFromHeadlessMode to wake the app and then getExtrasFromHeadlessMode to determine what to do.

@kimho
Copy link
Author

kimho commented Aug 24, 2020

@bkdev98
Thank you for answer. When I use IncomingCall.backToForeground() it works the way I want.

@kimho kimho closed this as completed Aug 25, 2020
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