Search code examples
androidandroid-contentproviderandroid-contacts

Bridging users together that have the same app installed from their contacts list


I'm trying to make an Android app where I use a users' ContactsContract database to link the user to another user in there contacts list, who also happens to have this specific app downloaded. But I'm having trouble visualizing best practices to go about achieving this functionality?

Example: John downloaded the app "FirstApp". He has someone in his contacts list, Bob, who also downloaded the app "FirstApp". When John clicks a button in the app, it'll open his contacts list, but only Bob should be available because he's the only one with "FirstApp" installed.

Is this sort of concept built-in already? I'm not seeing it in the Android doc's. Does it involve having to build your own ContentProvider of some sort?

Thank you!


Solution

  • I don't think there's a built in feature to match that up.

    The only way i can figure out is for you to grab the whole list of the user's contacts and match it against your DB (and sync up every time the user adds a new contact).

    Just make sure the user is VERY aware that you intend to use his contact list as handling this on the wrong way could have your app flagged... fast.