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 change the ringtone of an incoming call on the phone, depending on the parameters of the incoming call? #784

Open
1 task
SumDanil opened this issue Jun 4, 2024 · 1 comment

Comments

@SumDanil
Copy link

SumDanil commented Jun 4, 2024

  • Reproduced on:
  • [ X ] Android
  • iOS

Description

Can I change the ringtone of the phone during an incoming call, depending on the parameters of the incoming call (parameters that come in the push notification)? For example, for everyday incoming calls, I want to use one ringtone, and when I want to highlight an incoming call, so that the user understands that it is a special incoming call, I play another ringtone on the phone. If it is possible, please tell me how to do it, thanks in advance

@taekeun-two
Copy link

I'm not a maintainer of this repo, but just want to share one information for you.
Personally I'm using react-native-incall-manager

// ringtone is basically for INCOMING call. it's independent to start() and stop()
// if you receiving an incoming call, before user pick up,
// you may want to play ringtone to notify user.
InCallManager.startRingtone('_BUNDLE_'); // or _DEFAULT_ or system filename with extension

// when user pickup
InCallManager.stopRingtone();
InCallManager.start();

// or user hangup
InCallManager.stopRingtone();
InCallManager.stop();

What about changing ringtone param in InCallManager.startRingtone(ringtone) according to some parameter in the push notification ?

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