Click here to Skip to main content
15,884,725 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am developing a React Native app that requires two buttons: one to initiate a Viber free voice call and another to initiate a WhatsApp voice call. I have tried multiple packages in React Native, including creating a native module in Java using the Android intent to achieve this functionality. However, I have been unable to successfully initiate the calls programmatically.

I am aware that it is reasonable to expect this functionality since there is an app called Drupe that is able to achieve it.

I would appreciate assistance in accomplishing the following:

- Initiating a Viber voice call programmatically from within my React Native app.
- Initiating a WhatsApp voice call programmatically from within my React Native app.

i do need to know how to initiate a call directly to add a function before it and capture the real call time.

What I have tried:

I have made several attempts to initiate Viber and WhatsApp voice calls programmatically within my React Native app. Here are the methods I have tried so far:

1. **React Native packages**: I have explored various React Native packages available for initiating voice calls, such as `react-native-viber` and `react-native-whatsapp`, but these packages did not provide the desired functionality.

2. **Native Module with Android intent**: To overcome the limitations of existing React Native packages, I created a custom native module in Java and used Android intents to launch the Viber and WhatsApp apps for initiating voice calls. However, this approach only redirected the user to the respective app screens, requiring manual intervention to initiate the actual call.

3. **Researching Drupe app**: I have studied the Drupe app, which successfully provides the functionality I am aiming for. However, I was unable to identify the exact implementation details or specific libraries they might be utilizing.

Despite these efforts, I have not been able to achieve the desired result of programmatically initiating Viber and WhatsApp voice calls from within my React Native app. I am now seeking guidance or code examples that could help me overcome this challenge and capture the call time information.
Posted
Updated 23-May-23 0:47am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900