[android-developers] Re: Proper way of importing contacts to the device/contacts operations are very slow

2010-03-29 Thread cpphool
thank you for your response! Unfortunately this method took even longer - 31sec on Magic. On 23 Mar, 15:50, timo prill timo.pr...@googlemail.com wrote: hey, try this. maybe its a faster approach to go directly through the ContentResolver instead of using createPersonInMyContactsGroup:      

[android-developers] Re: Proper way of importing contacts to the device/contacts operations are very slow

2010-03-29 Thread Nithin
Use AsyncTask to update the contacts . Nithin On Mar 29, 2:56 pm, cpphool cpph...@gmail.com wrote: thank you for your response! Unfortunately this method took even longer - 31sec on Magic. On 23 Mar, 15:50, timo prill timo.pr...@googlemail.com wrote: hey, try this. maybe its a faster

[android-developers] Re: Proper way of importing contacts to the device/contacts operations are very slow

2010-03-29 Thread cpphool
Can you give us some example? As I understand, AsynTask is used for threading. How should I use it to improve speed? I suppose I could create an AsyncTask with a method doInBackground(). This method would add only one contact at a time. Then, I call execute a hundred times. Is this what you mean?

[android-developers] Re: Proper way of importing contacts to the device/contacts operations are very slow

2010-03-23 Thread cpphool
Hi! Currently, I'm using HTC Magic (1.5) and Acer Liquid (1.6) to test the app. my sample code snippet for API 2.0: for (int i = 0; i 100; i++) { Log.d(TAG,iteracja + i); ContentValues personValues = new ContentValues();

Re: [android-developers] Re: Proper way of importing contacts to the device/contacts operations are very slow

2010-03-23 Thread timo prill
hey, try this. maybe its a faster approach to go directly through the ContentResolver instead of using createPersonInMyContactsGroup: ContentValues values = new ContentValues(); Uri uri; String id; ContentResolver cr = getContentResolver (); for (int i = 0; i