System Contacts intents

peacemaker

Expert
Licensed User
Longtime User
HI, All

Who has the tested code for working with the system Contacts ?

1) View contact by its ID (got by Contacts2 object), without tel number
2) Edit contact by its ID (got by Contacts2 object), without tel number
3) Create new contact intent without any data pre-entered

And any other intent samples about the conatcs, but really tested\working - let's share here, in this thread.
 
Erel,

Do you know what can be a problem with intent:
Code: Copy
      Dim i As Intent
      i.Initialize("android.intent.action.EDIT","content://contacts/people/" & v)
      StartActivity(i)

if v is Contact.id from Contacts2 ?

Some contacts are opened OK, but some - wrong contact is opened.
The full list (by GetAll) has contacts from several accounts.
But IDs look unique.

So why wrongly opened ?
 
Upvote 0
Ohh... what kind is in Contacts2 used ?
And what for intent is needed ?
 
Upvote 0
I just need any intent sample (working for sure) for opening the contact edition.
Now ID from Contacts2 with this intent opens contacts that is near the ID number, say ID = 40, but opened the contact 38.
 
Upvote 0
Erel,

Is it possible to open anyhow a contact by the ID (from Contacts2) by some system Intent ?
View or edit, better.
 
Upvote 0
Back
Top