Hi Usama,

There is really no way to completely hide a contact.  You can remove it from
the default view by changing the GROUP_VISIBLE field for all existing groups
as well as UNGROUPED_VISIBLE on all rows in the Settings table.  However,
the user can always manually undo this by going to Contacts/menu/Display
Options.

You can delete contacts by calling
contentResolver.delete(Contacts.CONTENT_URI, null, null);   But there are a
few issues with this:  first, the sync adapter will pop up a message saying
"you are attempting to delete ... contacts, are you sure?"  The user can
just say no.  But if the user says yes, the contacts will deleted from the
backend storage as well.  Contacts that were never synced to the backend
storage will be removed irreversibly.  So be careful with deleting contacts.

Cheers,
- Dmitri

On Thu, Jul 8, 2010 at 11:04 AM, Usama <[email protected]> wrote:

> I am currently making an application that's to work as auto-theft. The
> user whose mobile is stolen sends an sms to his phone and it's
> intercepted by the application installed in the phone. According to
> the format and instructions the phone performs the tast. I am making a
> module to hide the contacts on a particular instruction. How do I go
> about it. I have worked on inserting and updating contacts but how do
> I hide them, such that they are not visible in the native contacts
> app. They should become visible when the user sends another
> instruction... that means they are not to be deleted.
> and I had another query related to this ... how do we delete a
> contact ?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to