Coder Social home page Coder Social logo

Comments (13)

Pakyyy avatar Pakyyy commented on June 20, 2024 1

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.

janpio avatar janpio commented on June 20, 2024

Not with this plugin.

Are there native APIs to achieve this?

from cordova-plugin-contacts.

vc-hitesh avatar vc-hitesh commented on June 20, 2024

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.

Bramzor avatar Bramzor commented on June 20, 2024

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.

PragatiRode avatar PragatiRode commented on June 20, 2024

I am facing the loading contact more than 3500 issue on Android and IOS both platform.
is there any alternative?

from cordova-plugin-contacts.

Bramzor avatar Bramzor commented on June 20, 2024

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.

PragatiRode avatar PragatiRode commented on June 20, 2024

from cordova-plugin-contacts.

Bramzor avatar Bramzor commented on June 20, 2024

@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.

PragatiRode avatar PragatiRode commented on June 20, 2024

from cordova-plugin-contacts.

PragatiRode avatar PragatiRode commented on June 20, 2024

from cordova-plugin-contacts.

Bramzor avatar Bramzor commented on June 20, 2024

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.

vc-hitesh avatar vc-hitesh commented on June 20, 2024

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.

breautek avatar breautek commented on June 20, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.