Skip to main content

Hide my app contacts from user



I want to use the contacts API but for my specific application my users will most likely not want these contacts polluting their contact list. The application is targeted for delivery drivers and I want to use Contacts to keep track of past deliveries. I don't really care if the user can edit or change the contacts, but I don't want to confuse the user by having these contacts start populating in their address book.





Any ideas? Otherwise I will use a SQLite Database but I hate re-inventing functionality.


Comments

  1. Why don't you just store your own contact to another database...? Ideally in your application.

    ReplyDelete
  2. The contact list allows you to set the "is visible group" setting.

    http://developer.android.com/reference/android/provider/ContactsContract.ContactsColumns.html#IN_VISIBLE_GROUP

    While you shouln't use this just because you are too lazy to write your own content provider, it is useful for some apps that you can save contacts in and don't want to annoy users with... (I think a number of apps do this, possibly Facebook at times?)

    You can simply set that flag when you insert the contact in the contacts content provider by setting the appropriate flags.

    ReplyDelete

Post a Comment

Popular posts from this blog

Slow Android emulator

I have a 2.67 GHz Celeron processor, 1.21 GB of RAM on a x86 Windows XP Professional machine. My understanding is that the Android emulator should start fairly quickly on such a machine, but for me it does not. I have followed all instructions in setting up the IDE, SDKs, JDKs and such and have had some success in staring the emulator quickly but is very particulary. How can I, if possible, fix this problem?