rohfosho / cordovacallnumberplugin Goto Github PK
View Code? Open in Web Editor NEWCall a number directly from your cordova application.
License: MIT License
Call a number directly from your cordova application.
License: MIT License
When installed on the device with Skype, Skype intercepts any call protocol from app. Is this intended?
Good day,
Struggling to get the an iOS app to call a number with special characters e.g. "*112#" which is a USSD service from the network operator. Any tips are welcome.
Thank you
HI,
First of all, I would like to thank you for this wonderful plugin.
It works well however I have a small issue, I want to dial a ussd, with below codes, it is dialing *500 not *500#
window.plugins.CallNumber.callNumber(function(results){
console.log(results);
}, function(onError){
console.log(onError);
}, '*500#');
Project build fails on Android with latest commit (978d936).
Here are some of the failing dev. environment details:
$ cordova -version
4.1.2
$ java -version
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)
$ ant -version
Apache Ant(TM) version 1.9.6 compiled on June 29 2015
$ cordova build android
[...]
-compile:
[javac] Compiling 28 source files to <cordova_project_path>/platforms/android/ant-build/classes
[javac] warning: [options] source value 1.5 is obsolete and will be removed in a future release
[javac] warning: [options] target value 1.5 is obsolete and will be removed in a future release
[javac] warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
[javac] <cordova_project_path>/platforms/android/src/mx/ferreyra/callnumber/CFCallNumber.java:49: error: cannot find symbol
[javac] PackageManager packageManager = cordova.getPackageManager();
[javac] ^
[javac] symbol: class PackageManager
[javac] location: class CFCallNumber
[javac] <cordova_project_path>/platforms/android/src/mx/ferreyra/callnumber/CFCallNumber.java:49: error: cannot find symbol
[javac] PackageManager packageManager = cordova.getPackageManager();
[javac] ^
[javac] symbol: method getPackageManager()
[javac] location: variable cordova of type CordovaInterface
[javac] <cordova_project_path>/platforms/android/src/mx/ferreyra/callnumber/CFCallNumber.java:50: error: cannot find symbol
[javac] List activities = packageManager.queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY);
[javac] ^
[javac] symbol: class List
[javac] location: class CFCallNumber
[javac] <cordova_project_path>/platforms/android/src/mx/ferreyra/callnumber/CFCallNumber.java:50: error: cannot find symbol
[javac] List activities = packageManager.queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY);
[javac] ^
[javac] symbol: variable intent
[javac] location: class CFCallNumber
[javac] <cordova_project_path>/platforms/android/src/mx/ferreyra/callnumber/CFCallNumber.java:50: error: cannot find symbol
[javac] List activities = packageManager.queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY);
[javac] ^
[javac] symbol: variable PackageManager
[javac] location: class CFCallNumber
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] Note: <cordova_project_path>/platforms/android/src/org/apache/cordova/file/ContentFilesystem.java uses unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 5 errors
[javac] 3 warnings
BUILD FAILED
<ant_path>/ant/build.xml:716: The following error occurred while executing this line:
<ant_path>/ant/build.xml:730: Compile failed; see the compiler error output for details.
Total time: 5 seconds
<cordova_project_path>/platforms/android/cordova/node_modules/q/q.js:126
throw e;
^
Error code 1 for command: ant with args: debug,-f,<cordova_project_path>/platforms/android/build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-gen
Error: <cordova_project_path>/platforms/android/cordova/build: Command failed with exit code 1
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1015:16)
at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
For the record, project is building ok on iOS with both previous (79333b3) and latest commits (978d936).
Project is building ok on Android with previous commit (79333b3).
Hello.
After intalling the plugin in config.xml appear line this your plugin. But the record is wrong because the id is mx.ferreya.callnumber and must be call-number. Please fix it.
Output from
ionic doctor check
***************************
* Plugin update available *
***************************
plugin: mx.ferreyra.callnumber
source: npm://call-number@^1.0.1
installed version: 0.0.2
remote version: 1.0.1
It would also be nice with a kind of official release
iOS 10.3.x
When window.plugins.CallNumber.callNumber() is called, the popup confirmation is displayed. If the user cancels the dial, the error callback is returned with CouldNotCallPhoneNumber.
While CouldNotCallPhoneNumber is technically true it leaves no way of discerning why you couldn't call... and technically speaking, a canceled call is not a failed call.
Would you please add a more accurate error message?
Thanks!
Does this plugin bypass the user having to still dial the number on android?
How do I include the JS file?
While installing the plugin, getting the following error
` ionic cordova plugin add call-number
> cordova plugin add call-number --save
โ Running command - failed!
[ERROR] An error occurred while running cordova plugin add call-number --save (exit code
Error: Failed to fetch plugin git+https://github.com/Rohfosho/CordovaCallNumberPlugin.git via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Failed to get absolute path to installed module`
Even the same error while i use the github path too.
I am using Ionic
@ionic/cli-utils : 1.4.0
Cordova CLI : 7.0.1
Ionic CLI : 3.4.0
@ionic/app-scripts : 1.1.4
@ionic/cli-plugin-cordova : 1.4.0
@ionic/cli-plugin-ionic-angular : 1.3.1
Cordova Platforms : android 6.2.3
Ionic Framework : ionic-angular 2.3.0
When adding a platform using
cordova platform add android
All other plugins are installed except this one, it fails with the message:
Discovered plugin "mx.ferreyra.callnumber" in config.xml. Adding it to the project
Failed to restore plugin "mx.ferreyra.callnumber" from config.xml. You might need to try adding it again. Error: Failed to fetch plugin mx.ferreyra.callnumber@~0.0.2 via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: npm: Command failed with exit code 1 Error output:
npm ERR! Linux 4.4.0-79-generic
npm ERR! argv "/opt/node-v7.8.0-linux-x64/bin/node" "/opt/node-v7.8.0-linux-x64/bin/npm" "install" "mx.ferreyra.callnumber@~0.0.2" "--save"
npm ERR! node v7.8.0
npm ERR! npm v4.2.0
npm ERR! code E404
npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/mx.ferreyra.callnumber
npm ERR! 404
npm ERR! 404 'mx.ferreyra.callnumber' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
Hi,
Its nice, to the point plugin and very well written. I just want to know if you can extend to Windows Phone and Blackberry so that it completes the smart phone cycle.
Its giving me TypeError: Cannot read property 'CallNumber' of undefined error.
Please help on this.
Ran npm install call-number and received this message.
npm WARN [email protected] license should be a valid SPDX license expression.
The Plugin did not install.
Using PhoneGap Desktop 4.5 on Windows 8 64 bit. Building for IOS.
Please add a license to this project.
Today I added this plugin for my app. And I'm getting the error.
I added the plugin using cordova plugin add https://github.com/Rohfosho/CordovaCallNumberPlugin.git
and tried changing window.plugins to window.cordova.plugins too.
Nothing worked.
I referred this issue and this one as well.
Added the script file even. But still no good. What can be the reason for this ?
When making a phone call on iOS 10.3.1 a confirmation message dialog is shown, disappear on it's own (without user action) and shows it again . iOS versions before this version don't show this behaviour.
After installing the plugin using:
$ ionic cordova plugin add call-number
$ npm install --save @ionic-native/call-number
And adding the call to plugin (module or page):
import { CallNumber } from '@ionic-native/call-number';
The app stops building:
I've got an empty
In the console I've got:
deviceready has not fired after 5 seconds.
cordova.js:1178 Channel not fired: onNativeReady
cordova.js:1178 Channel not fired: onCordovaReady
cordova.js:1178 Channel not fired: onCordovaSimulateReady
Plugin version is 4.3.1
Latest commit (648d98b) breaks android build for me, also tried 19/02/2016 commit (ee8a081) with same problem.
After looking though the closed issues, #15 states commit (79333b3) builds successfully, which indeed does work for me and works successfully in my app.
Corvoda version 5.4.1
Java version 1.8.0_74
Error:
:compileDebugJava
C:\PhoneGap\<appname>\platforms\android\src\mx\ferreyra\callnumber\CFCallNumber.java:27: error: cannot find symbol
cordova.requestPermission(this, requestCode, CALL_PHONE);
^
symbol: method requestPermission(CFCallNumber,int,String)
location: variable cordova of type CordovaInterface
C:\PhoneGap\<appname>\platforms\android\src\mx\ferreyra\callnumber\CFCallNumber.java:35: error: cannot find symbol
if (cordova.hasPermission(CALL_PHONE)) {
^
symbol: method hasPermission(String)
location: variable cordova of type CordovaInterface
ERROR building one of the platforms: Error: cmd: Command failed with exit code 1
You may not have the required environment or OS to build this project
Error: cmd: Command failed with exit code 1
Just browsed through the code and found that success callback is called twice.
running 'cordova plugin add https://github.com/Rohfosho/CordovaCallNumberPlugin.git' in console and get this:
Error: Failed to fetch plugin https://github.com/Rohfosho/CordovaCallNumberPlugin.git via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Failed to get absolute path to installed module
Whit connection all is ok, checked. Cordova version: 7.0.1
When trying to place a call on Android 6.0, occurs an error with the following message : CouldNotCallPhoneNumber
I try to run *123# but nothing happens.
Hi!
I've used this plugin in Ionic v1 and Android for a while, working really good! Now when I'm using the app on ios i get the message: "ERROR: Plugin 'Call Number' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml."
The plugins list shows 'call-number 0.0.2 "Cordova Call Number Plugin"', so I guess that it's a rather old version I'm using. But that might be correct because I still use Ionic v1...
I tried removing and adding ios platform, and removing and installing the plugin, but still doesn't work...
Is it possible to get this to work on ios (11) also, or how to resolve this?
As you're never doing
pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
in CFCallNumber.m the Error-Function will always be the called one (under iOS at least).
Hi,
Can you please suggest how can I use this plug-in as a PhoneGap plug-in?
I need to specify the plug-in with proper namespace and version information and build it for Android and iOS (FYI, I am using DevExtreme FW by DevExpress.com).
The example/tutorial or any documentation URL would be a great help.
Also if you can, Please suggest, if following requirement, can be achieved using this plug-in
STEP 1: User clicks on a button to dial a specific number.
STEP 2: Plug-in takes over control and auto-dials the said number. (It means,that would be best, if the dial pad is hidden and call initiated automatically.)
STEP 3: Once the call is through or hanged up, the Plug-in closes the dial pad and passes the control back to application.
Thanks, I need this ASAP.
Hello, I'm building a cordova application, I need to enable android permissions to allow make a phone call, please tell me what would be the xml structure to enable this, for example here is a list of xml params I need to send sms and enable geolocation:
<plugin name="SplashScreen" value="org.apache.cordova.SplashScreen"/>
<feature name="SmsPlugin">
<param name="android-package" value="org.apache.cordova.plugin.SmsPlugin"/>
</feature>
<feature name="geolocation">
<param name="android-package" value="org.apache.cordova.geolocation"/>
</feature>
i got this error please help me ????
When compiling for Phonegap 4.1.1 (Android/PGB) I get the following error:
Error - Some official plugins have to be updated if using PhoneGap >= 4.0.0. Please upgrade the version of any plugins that may include the following file: CFCallNumber.java - You can fix this here
Any chance of fixed this?
The dialer is failing to dial USSD calls like *125# or #322. How can I solve this?
Hi does your plugin supports call time or callback based on call finished?
Dev,
Can you please publish this plugin to npmjs.com and cordova.apache.org/plugins so that we can use it in phonegap build.
Thank you for your effort.
The plugin works like a charm on Android, but when trying to make the phone call on iOS it breakes.
The code i use to make the call is this:
window.plugins.CallNumber.callNumber(function(){}, function(){}, number, true);
The app crashes in CFCallNumber.m in this line:
number = [number stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
This is the log i get from xCode:
AccesiveMobileTipo1[1398:1158471] -[__NSCFNumber stringByAddingPercentEscapesUsingEncoding:]: unrecognized selector sent to instance 0x16d00770
2017-03-29 10:15:47.068092 AccesiveMobileTipo1[1398:1158471] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFNumber stringByAddingPercentEscapesUsingEncoding:]: unrecognized selector sent to instance 0x16d00770'
*** First throw call stack:
(0x1b8c0df7 0x1ab23077 0x1b8c6505 0x1b8c4579 0x1b7e93d8 0xab215 0x306d57 0x31353b 0x314d9f 0x314ba7 0x1b11b937 0x1b11b490)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
now on npm repo, call-number is still version 1.0.1, who can update the call-number package to 1.0.4. thanks
I have added this plugin in ionic app using command.
$ ionic cordova plugin add call-number
$ npm install --save @ionic-native/call-number.
Then i commit my ionic app in git.After i checkout my application from git, then i installed npm install.I got this error like this.
npm ERR! code E404
npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/mx.ferreyra.callnumber
npm ERR! 404
npm ERR! 404 'mx.ferreyra.callnumber' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of 'ionic-hello-world'
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
How can i solved this issue ?
Hello,
I recreated my ionic application few minutes ago, and I can't call anymore.
I receive an "CouldNotCallPhoneNumber" Error each time ( +33123456789 )
I see you have just made some changes in code one hour ago, it's may be a new bug ?
Regards
Hi, is posible make a call with speaker activate automatically?
Error while calling this plugin i got error mentioned in title.
Please help me whats the problem is CallNumber.js is correct ??
Using window.plugins.CallNumber.callNumber(onSuccess, onFailure, number);
the success callback is being called immediately on calling the method. This brings up the native call confirmation dialog, and neither of the callbacks get called on tapping Call
or Cancel
.
It would be great to have a full explained text on how to use this plugin and some example. I am new to this, so i want to understand how it works. thanks
Hi,
When trying to dial USSD codes with this plugin on ios device (works well on android devices) I get this error:
Error:CouldNotCallPhoneNumber
What could be the reason?
Hi,
Is there a way to hang up the phone call inside success callback of callNumber() function ?
Thanks,
Please see this issue if you can fix it danielsogl/awesome-cordova-plugins#643 (comment)
After the ionic cli update ionic v 3.12.0, call number plugin always throws 'Error launching dialer'.
on Android 7 and using Ionic Native npm package https://ionicframework.com/docs/native/call-number/
the app dials the number automatically without showing the prompt for choosing the dialer.
Hi, is it possible to check if the call already finished or not with this plugin ?
If it isn't can't u add the feature?
Thanks.
After i upgraded Ionic Framwerok and the Call Number plugin when i try to call the app return this error:
console.warn: Native: tried calling CallNumber.callNumber, but the CallNumber plugin is not installed.
console.warn: Install the CallNumber plugin: 'ionic cordova plugin add call-number'
I re-install the native plugin
$ ionic cordova plugin add call-number
$ npm install --save @ionic-native/call-number
but I have the same issue
Hello,
The plugin was working perfectly when I first used it (around 2 weeks ago), and then suddenly inexplicably started throwing "CannotCallNumberError" on my android testing device.
These are the project details:
Cordova version 6.0.0
Ionic 1.7.14
Call-number plugin : mx.ferreyra.callnumber 0.0.2 "Cordova Call Number Plugin"
number format (both iOS and Android): "+961*******" (I'm 100% sure the number is a valid one)
Android version: 6.0
The plugin is working flawlessly on iOS devices, so I'm inclined to think that it is an issue with Android 6.0.
Any help would be appreciated!
Hello everyone!
The plugin works fine for me, except that before trying to make a call, the application restarts all by itself. Is it an expected thing to happen or the problem may be on my code? I wished to get right back to the state the application was before the call.
Thanks in advance.
I am trying to use this plugin with Cordova and i have this Error:
Error:Class not found.
Help me please
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.