Skip to content

kolach/cordova-plugin-phone-number

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cordova PhoneNumber plugin for Android

Gets the number of the phone. It should work if the phone number is available on Settings -> About Phone -> Status -> My phone number.

Installation

With cordova-cli

If you are using cordova-cli, install with:

cordova plugin add https://github.com/kolach/cordova-plugin-phone-number.git

Use from Javascript

Works with Angular only:

cordova.getPhoneNumber(function (number) {
    alert(number);
});

cordova.getNetworkCountryCode(function (countryCode) {
    alert(countryCode);
});

cordova.getSimCountryCode(function (countryCode) {
    alert(countryCode);
});

## Credits

Written by Nick Chistyakov at AssuredLabor

Code based on the following posts:

About

Cordova plugin to return phone number

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published