Inserting a New Contact with an Intent
As an application developer, you may want to let your users insert new contacts
when the application receives new data. Let us say that your Android application
is designed to review restaurants. You may want your users to add restaurants as
their contacts while they review them. This is such a great idea since they can
contact the restaurant easily in case they want to go back.
So what should you do to make this happen? Well, you need to build the intent
by using as much data as you can. Afterwards, you should send your intent to the
contacts application. When you use the contacts application to insert a contact,
you
are
also
able
to
insert
a
new
raw
contact
into
the
ContactsContract.RawContacts table of your Contacts Provider.
Do'stlaringiz bilan baham: |