You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ x] I've checked the example to reproduce the issue.
Reproduced on:
[x ] Android
iOS
Description
I’m currently using selfManaged in Android. When the phone is receiving an incoming call and is in the RINGING state, my app also receives a call, but the library is unable to manage this scenario properly.
I propose two possible solutions:
Solution 1:
I noticed in the code that there is a function public void onCallStateChanged.
Can I add a new action "RNCallKeepHasRingingCall" and, in the switch case (TelephonyManager.CALL_STATE_RINGING) (TelephonyManager.CALL_STATE_RINGING), include the following line of code?:
This would allow me to send an event to JavaScript notifying when the phone is in the RINGING state.
Additionally, I will create another event for the TelephonyManager.CALL_STATE_IDLE case to notify when the phone returns to the IDLE state.
Solution 2:
Create a private boolean property, hasRinging, and update its value in the aforementioned cases in solution 1. Then, I can export the value of this property via a function to JS
Please let me know which approach you would prefer so I can proceed with creating a PR
Bug report
[ x] I've checked the example to reproduce the issue.
Reproduced on:
[x ] Android
iOS
Description
I’m currently using selfManaged in Android. When the phone is receiving an incoming call and is in the RINGING state, my app also receives a call, but the library is unable to manage this scenario properly.
I propose two possible solutions:
Solution 1:
I noticed in the code that there is a function public void onCallStateChanged.
Can I add a new action "RNCallKeepHasRingingCall" and, in the switch case (TelephonyManager.CALL_STATE_RINGING) (TelephonyManager.CALL_STATE_RINGING), include the following line of code?:
RNCallKeepModule.this.sendEventToJS("RNCallKeepHasRingingCall", args);
This would allow me to send an event to JavaScript notifying when the phone is in the RINGING state.
Additionally, I will create another event for the TelephonyManager.CALL_STATE_IDLE case to notify when the phone returns to the IDLE state.
Solution 2:
Create a private boolean property, hasRinging, and update its value in the aforementioned cases in solution 1. Then, I can export the value of this property via a function to JS
Please let me know which approach you would prefer so I can proceed with creating a PR
Regards
Orestes
Steps to Reproduce
Versions
Logs
The text was updated successfully, but these errors were encountered: