-
Notifications
You must be signed in to change notification settings - Fork 51
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
Nothing happening when calling RNImmediatePhoneCall.immediatePhoneCall() #40
Comments
Same here `npm install react-native-immediate-phone-call --save react-native link react-native-immediate-phone-call` Then when using the following, nothing happens
|
Confirmed, nothing happens... |
Well, do you guys use the latest RN version? Linking has changed for ios and I did not use or test this myself... that might be the issue... |
@wumke Thanks for replying |
If you find the solution feel free to send a pull request for the README ! |
Have you managed to get it working @R44J / @jonybar9 / @Sidharth1999 ? |
@murbanowicz try wrap the call in try catch block |
Ok I think I figured it out, I'll upload later what I did differently |
Ok so @wumke didn't contact me so I'll just post my solution here and if one of you has the time make a pull request First do react-link In settings.gradle: In build.gradle: In AndroidManifest.xml: In MainActivity.java:
|
@jonybar9, Thanks. It works. But I think you have missed importing this |
Hello @wumke, and @jonybar9, using the same way it's not working as expected
Here are some details on my project
|
@Habinezajanvier Sorry to hear that. |
Maybe the newer Android versions also blocked direct calling, and forward us to the dailer now (just like Apple did before, see readme). It is possible that there is no longer an option to immediately start a call without an intermediate action/confirmation. If someone knows a solution, feel free to create a pull request. |
is there a way to do it directly in expo? |
I've experienced the same in expo once I built the .apk using eas build. When I tap the button that should start the phone call, nothing happens. @wumke would you know what the issue is and how to fix it? I followed the readme by adding |
I managed to make this work but had to use React Native CLI instead of expo. After doing some research on the expo icebox and the expo intent launcher package it seems that at the moment expo has no way for us to ask the user for the CALL_PHONE permission. Nevertheless, the API is still supported by Android so, if you install the package through RN CLI, the functionality works. |
Hi,
I installed and linked the module successfully on iOS, but when I call RNImmediatePhoneCall.immediatePhoneCall() with some phone number, nothing happens.
What could be the reason? Do I need to explicitly check and request permission to make a phone call? Do I need to modify some other native files as well? Is it because I'm using a simulator?
Any help would be appreciated, thanks
The text was updated successfully, but these errors were encountered: