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
CallNumber.callNumber('4083868925', false); - this works CallNumber.callNumber(4083868925, false); - this fails
As mentioned in call-number.d.ts, numberToCall is expected in number format but it fails on real device. Passing numberToCall in string format works.
/**
* @name CallNumber
* @description
* Call a number directly from your Cordova/Ionic application.
*
* @usage
* ```
* import {CallNumber} from 'ionic-native';
*
* CallNumber.callNumber(18001010101, true)
* .then(() => console.log('Launched dialer!'))
* .catch(() => console.log('Error launching dialer'));
*
* ```
*/
export declare class CallNumber {
/**
* Calls a phone number
* @param numberToCall {number} The phone number to call
* @param bypassAppChooser {boolean} Set to true to bypass the app chooser and go directly to dialer
*/
static callNumber(numberToCall: number, bypassAppChooser: boolean): Promise<any>;
}
Also, behind the scenes, ionic-native uses https://github.com/Rohfosho/CordovaCallNumberPluginwhich also expects numberToCall in string.
The text was updated successfully, but these errors were encountered:
CallNumber.callNumber('4083868925', false);
- this worksCallNumber.callNumber(4083868925, false);
- this failsAs mentioned in
call-number.d.ts
, numberToCall is expected in number format but it fails on real device. Passing numberToCall in string format works.Also, behind the scenes, ionic-native uses
https://github.com/Rohfosho/CordovaCallNumberPlugin
which also expects numberToCall in string.The text was updated successfully, but these errors were encountered: