Comments (13)
This plugin really take some time to load if you are reading a large amount of contact, as it convert all the information in the contact to a dictionary and transfer from native side to Cordova. (Tested on my own iOS device loading 2000+ contact required like 90s)
Sadly there is not much we can do, I would suggest to read those necessary field ONLY using options.desiredFields
for example:
var options = new ContactFindOptions(); options.desiredFields = [navigator.contacts.fieldType.name, navigator.contact. phoneNumbers]; // read only those you want to display
which will greatly improve the loading time (in my case loading 2000+ contact in less that a second).
from cordova-plugin-contacts.
Not with this plugin.
Are there native APIs to achieve this?
from cordova-plugin-contacts.
No, Not using API.
Only when the user has more than 3000 contacts in the phone book and tries to get the full list in the application at that time I am facing this issue.
Is there any way to improve the performance of import contact ?
from cordova-plugin-contacts.
Cordova people will not work on this plugin anymore so the only alternative would be that people from ionic capacitor would create their own plugin that has the same functionality so we could all migrate to capacitor.
from cordova-plugin-contacts.
I am facing the loading contact more than 3500 issue on Android and IOS both platform.
is there any alternative?
from cordova-plugin-contacts.
What you can try is by trying to load in smaller batches? So a contact search which will return a batch and on a later time or even directly after the first load, a second, third, ... Difficulty here is that you want to make sure you do not load a contact more than once.
from cordova-plugin-contacts.
from cordova-plugin-contacts.
@PragatiRode Do you really need to load the 4000 contacts or are these 4000 contacts on Android which are automatically created by gmail? You can skip these by only loading contacts with a phonenumber so you would avoid loading all 4000.
from cordova-plugin-contacts.
from cordova-plugin-contacts.
from cordova-plugin-contacts.
Sorting you should do after loading the contacts by simply using array sorting (so not in scope of the plugin).
Repeated phonenumbers depends on local contacts, probably they do exist multiple times in your local contacts and in that case you need to filter out the duplicates yourself.
Selection of multiple contacts, that is also something you need to develop outside the plugin.
from cordova-plugin-contacts.
Is there any way that application auto sync with the phonebook. That if user added new contact its automatically added to the application contact list.
from cordova-plugin-contacts.
Thank you @Pakyyy for providing a workaround.
I agree, with what you said that there isn't much that can be done when it comes to large contact listings. Using the desiredFields
to only include the fields you need for listing is probably the best approach. You can also probably make use of the filter
field to fetch more detailed information for a specific contact when needed as well.
I don't think there is anything to be done here from Cordova's side, so I'll be closing this issue as "Won't fix"
from cordova-plugin-contacts.
Related Issues (20)
- ionic contacts error: Cannot read property 'split' of undefined HOT 4
- All the fields are giving null value but count is correct. Ionic 4. HOT 1
- modify the contact picture HOT 2
- NullInjectorError: No provider for Contacts! HOT 3
- conduct contact.save() twice on Android, but only get one contact. HOT 3
- Plugin skip birthday without year on android HOT 1
- Best approach for searching on phone number HOT 5
- displayName:Null for android and ios HOT 2
- iOS 13 note field of contact is null HOT 3
- Support multiple find contact inside a Loop HOT 7
- No way to display single contact that I just added with this plugin? HOT 1
- App Crash after save the new contact in Android 9 HOT 2
- Localized Phone Label (iOS) HOT 1
- App crashed HOT 4
- Possible deadlock in iOS queue management code HOT 2
- Ios-9 : AddressBook is deprecated. Consider migrating to Contacts/ContactsUI. in ionic 4/5 HOT 3
- App crash in android 10 HOT 5
- App Crash with iOS 14 HOT 3
- Not able to fetch newly added contacts and contact last updated timestamp HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-plugin-contacts.