[android-developers] Re: Working with the new ContactContracts API

2010-02-12 Thread Berto
Well now I just feel stupid since that's pretty out in the open. One last question: how exactly do you go about requesting a sync (let's say after they change some custom options for the account)? I've tried requestSync but it never really seems to kick off the sync unless I'm not waiting long

[android-developers] Re: Working with the new ContactContracts API

2010-02-12 Thread Berto
I figured this out. I was passing in the wrong value for the authority. On Feb 12, 7:56 am, Berto mstbe...@gmail.com wrote: Well now I just feel stupid since that's pretty out in the open.  One last question: how exactly do you go about requesting async(let's say after they change some custom

[android-developers] Re: Working with the new ContactContracts API

2010-02-11 Thread Berto
Hey Dmitri, If I want my contacts to show up by default when I go into the contacts application and not have to go into Display Options to turn them on, where would I go to tweak that setting? On Jan 29, 11:47 am, Dmitri Plotnikov () dplotni...@google.com wrote: You are deleting data

Re: [android-developers] Re: Working with the new ContactContracts API

2010-02-11 Thread Dmitri Plotnikov
Take a look at Settings.UNGROUPED_VISIBLE If you set this to 1 for your account, all contacts will be visible by default. On Thu, Feb 11, 2010 at 3:03 PM, Berto mstbe...@gmail.com wrote: Hey Dmitri, If I want my contacts to show up by default when I go into the contacts application and not

[android-developers] Re: Working with the new ContactContracts API

2010-01-29 Thread andev
Hello, I have been working with contacts. I am able to show them, update but when I want to delete any, it is not deleted completely. In Contacts application is shown as (Unknown) without any data. What is more, I am not able to delete it (only after I give this contact name). I have tried to

Re: [android-developers] Re: Working with the new ContactContracts API

2010-01-29 Thread ▯▯▯▯
You are deleting data associated with the contact, not the contact itself. It should be something like this: ArrayListContentProviderOperation ops = new ArrayListContentProviderOperation(); ops.add(ContentProviderOperation.newDelete(Contacts.CONTENT_URI)

[android-developers] Re: Working with the new ContactContracts API

2009-12-22 Thread Richa Saraswat
as m new to android i just want to know how to get a photo from person's contact?? hope to get some help... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To

Re: [android-developers] Re: Working with the new ContactContracts API

2009-12-22 Thread Dmitri Plotnikov
Hi Richa, You can find explanations and an example here: http://developer.android.com/reference/android/provider/ContactsContract.Contacts.Photo.html Cheers, - Dmitri On Tue, Dec 22, 2009 at 3:58 AM, Richa Saraswat richa@gmail.com wrote: as m new to android i just want to know how to get

[android-developers] Re: Working with the new ContactContracts API

2009-12-21 Thread Molee
for content of email and note, by convention, you can put then into column data1 directly ContactsContract.DataColumns.data1 i found that there is no object in ContactsContract.CommonDataKinds.Email representing data1 hence i just put data1 directly and it works

Re: [android-developers] Re: Working with the new ContactContracts API

2009-12-21 Thread Dmitri Plotnikov
That's right. DATA1 is used for the most important data element by convention. Email has an unfortunate alias DATA for DATA1. In 2.1 we will also have Email.ADDRESS mapping to DATA1. The DATA1 column is indexed, so doing searches on that column in combination with a MIMETYPE constraint will be

[android-developers] Re: Working with the new ContactContracts API

2009-11-18 Thread EMMNS
Hi all, thanks for your posts, that got me started and going on the new sdk 2.0, but still facing some problems adding contacts. let's say i have an array of String has the contacts info String[] c = new String[] {First name,Last name,mobile number, home number, work number, fax number, email

[android-developers] Re: Working with the new ContactContracts API

2009-11-17 Thread Ian
Jesus, is there any intent by Google to document Contacts usage??? This is a basic subject that has become very complicated and should be documented in the Developers's Guide on top of the obtuse API docs... On Nov 10, 3:36 pm, Jonathan Herriott herri...@gmail.com wrote: Hi Dmitri, So, if I

[android-developers] Re: Working with the new ContactContracts API

2009-11-10 Thread Jonathan Herriott
Hi Dmitri, So, if I want to sync with my own backend which supports a different protocol, my assumption is that I need to somehow register a Sync Adapter, in which case, I'll have my own SyncAdapterType. I can't seem to find documentation on this, and the only thing I can find is a class called

[android-developers] Re: Working with the new ContactContracts API

2009-11-09 Thread A B
Hi Dmitri, Thanks for you info regarding the new API - it was r4eally helpful. I'm trying to use it to create new contact but I constantly have problems. Do you know if this is the final version of the API ? Or maybe it's still not finish thus that's why we don't get any real documentation or

Re: [android-developers] Re: Working with the new ContactContracts API

2009-11-09 Thread sukumar bhashyam
hi Dmitri, Thanks for throwing some light on SyncAdapters. Once a new sync account and sync adapter is created ( By inherting AbstractThreadedSyncAdapter) for a sync application,how does any other application wants to call sync for the same sync app will bind?. Was it through SyncManager or

[android-developers] Re: Working with the new ContactContracts API

2009-11-09 Thread Hans5
I ran into a problem with the new contacts API today that other developers may end up encountering. I bought a Droid and had the contacts from an old phone (not an Android phone) moved over at the store. I'm not sure how they moved over the contacts, but they never linked the phone to a Google

[android-developers] Re: Working with the new ContactContracts API

2009-11-09 Thread jarkman
Dmitri - could I ask you another question ? We are setting custom ringtones for contacts: Uri contactUri; // eg: content://com.android.contacts/contacts/12 ContentValues values = new ContentValues(); values.put(ContactsContract.Contacts.CUSTOM_RINGTONE, newRingtoneUri.toString());

Re: [android-developers] Re: Working with the new ContactContracts API

2009-11-09 Thread Dmitri Plotnikov
The way you are setting ringtones looks right. Setting them on the aggregate contact is the right way to go. Can you see any pattern? Is there anything in common between the contacts that don't take the ringtone? Can you set the ringtone on those using the standard Contacts app? Thank you

Re: [android-developers] Re: Working with the new ContactContracts API

2009-11-09 Thread sukumar bhashyam
hi Dmitri, Could you please answer my post regarding syncAdapters in the same thread. Pasting it again below. Thanks for throwing some light on SyncAdapters. Once a new sync account and sync adapter is created ( By inherting AbstractThreadedSyncAdapter) for a sync application,how does any

[android-developers] Re: Working with the new ContactContracts API

2009-11-09 Thread jarkman
Dmitri - thanks. Our users are generally lovely people, but it is hard to get enough detail from them to know what the pattern might be. It might even be them making mistakes in their contact data. I shall keep digging! R. On Nov 10, 5:40 am, Dmitri Plotnikov dplotni...@google.com wrote: The

[android-developers] Re: Working with the new ContactContracts API

2009-11-07 Thread Ravi
Hi Dmitri, This thread is very helpful and thank you for taking time - believe me I really appreciate your help. Is there any plan that you are aware of that google would publish contacts changes rather than bugging people on groups for the select knolege of supposed to be opensource system ? --

[android-developers] Re: Working with the new ContactContracts API

2009-11-06 Thread jarkman
Jake - thanks for that. Your code seems to match my understanding of Dmitri's recipe, and also actually seems to work for me. Which i hope is good news... :-) Richard On Nov 5, 9:20 pm, jak. koda...@gmail.com wrote: Hi Dmitri Jarkman, Hope everyone's having a good day. I'm also working on

Re: [android-developers] Re: Working with the new ContactContracts API

2009-11-05 Thread Dmitri Plotnikov
This line: context.getContentResolver().update(ContactsContract.Data.CONTENT_URI, values, ContactsContract.Data.RAW_CONTACT_ID + = + personId, null); attempts to change ALL data rows that have RAW_CONTACT_ID == personId, which includes the photo, but also phone numbers, emails etc. You will

[android-developers] Re: Working with the new ContactContracts API

2009-11-05 Thread jarkman
Oops! I see what you mean. Perhaps that update was a little bold... :-) So I need to search out the right row (with the right contact ID and the photo's MIME type) in the Data table with a query, then update that row ? If there isn't a pre-existing photo, do I also need to update

Re: [android-developers] Re: Working with the new ContactContracts API

2009-11-05 Thread Dmitri Plotnikov
Right. Setting the new photo to super-primary should take care of the PHOTO_ID reference. You should not need to worry about resetting the super-primary flag on other photos for the same contact - that's also automatic. Cheers, - Dmitri On Thu, Nov 5, 2009 at 12:04 PM, jarkman

[android-developers] Re: Working with the new ContactContracts API

2009-11-05 Thread jak.
Hi Dmitri Jarkman, Hope everyone's having a good day. I'm also working on adding photo's for a contact. Based on your discussion I came up with this method. It's seems to do the job, but I'm not entirely confident that I'm doing things in the best way. Can you please review it and let me know If

[android-developers] Re: Working with the new ContactContracts API

2009-11-05 Thread Vettey
Hi Dmitri, Thanks for introducing the database structure and the sample on how to insert contact with 2.0 API. I'd like to know how to manage Contacts, RawContacts, and Data table when deleting contacts. Any better way to delete a contact with specific name from database? - Vettey On Nov 5,

[android-developers] Re: Working with the new ContactContracts API

2009-11-04 Thread jak.
Thank you Dmitri, Your response was very helpful. Along with that, and the sample you posted on another thread about using both Contact Apis from one app, I've gotten most of the way there. It is much appreciated. I'm still however having some problems that I'm hard pressed to find a solution

Re: [android-developers] Re: Working with the new ContactContracts API

2009-11-04 Thread Dmitri Plotnikov
Hi Jake, The database structure is actually extremely straightforward: Contacts represents an aggregated contact RawContacts represents a contact as it was inserted by the sync adapter. RawContact has a CONTACT_ID field that binds it to a Contact. Data represents everything about a RawContact:

Re: [android-developers] Re: Working with the new ContactContracts API

2009-11-04 Thread Yao
Hi Dmitri, Would you please help point out how's new group structure? Something similar as groupmembership table in previous relese. Thanks a lot in advance! On Thu, Nov 5, 2009 at 10:47 AM, Dmitri Plotnikov dplotni...@google.comwrote: Hi Jake, The database structure is actually extremely