Cross-platform plugin for Cordova / Ionic to show add contacts user interface.
Use this repository
ionic plugin add https://github.com/davidrivasro07/manage-contacts-cordova-plugin.git
Use the navigator.manageContacts
with the method
add(data)
A full example could be:
//
//
// after deviceready
//
//
var name = "Call Pal";
var firstNumber = {
label: 'mobile',
number: $scope.number
};
var secondNumber = {
label: 'mobile',
number: '17864500211'
};
var data = {
name: name,
phones: [firstNumber, secondNumber]
};
navigator.manageContacts.add(data);
The plugin works with iOS and Android.
iOS does not provide a normalized number like Android. So number === normalizedNumber for iOS.
The Android code is heavily inspired from the official plugin with some tweaks to improve the perfomances.
Thanks for considering contributing to this project.
Ask, or pick an issue and comment on it announcing your desire to work on it. Ideally wait until we assign it to you to minimize work duplication.
-
Search existing issues before raising a new one.
-
Include as much detail as possible.
-
Make it clear in the issue tracker what you are working on, so that someone else doesn't duplicate the work.
-
Use a feature branch, not master.
-
Rebase your feature branch onto origin/master before raising the PR.
-
Keep up to date with changes in master so your PR is easy to merge.
-
Be descriptive in your PR message: what is it for, why is it needed, etc.
-
Make sure the tests pass
-
Squash related commits as much as possible.
-
Try to match the existing indent style.
-
Don't mix platform-specific stuff into the main code.
The MIT License
Copyright (c) 2016 David Rivas
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.