Advantages and Disadvantages of ContentProviderOperations and a Traditional Insert
Was reading the Android Devloper site here and read that there are 2 ways of inserting a contact into the contacts of the phone..
I was wondering which is the best, fastest way 开发者_运维知识库of inserting multiple contacts, say around 1000-5000 contacts at a time?
Also with the traditional insert method, can i specify an 'Account' for it to insert too?
Thank you.. :)
You've missed this: " All operations in a batch are executed in a single transaction, which ensures that the phone-side and server-side state of a raw contact are always consistent. Also, the batch-based approach is far more efficient: not only are the database operations faster when executed in a single transaction, but also sending a batch of commands to the content provider saves a lot of time on context switching between your process and the process in which the content provider runs."
精彩评论