Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android check if a contact installed an app android (like whatsapp)

I want to let my app scan the users contactlist , and display the name of the contacts who also installed the app.

I have no idea where to begin with this . so if someone could help me getting started , that would be apreciated.

grtz

like image 274
pieter Avatar asked Aug 31 '12 13:08

pieter


1 Answers

You will need to research ContentResolver because you will have to query the database containing the contacts. To do these queries, you will need the URI and column/header names for contacts db which can be found in the Contacts class.

You will also need users to register that they have your app on your own servers and the registration will need a piece of information about the user that other users would have in their contacts (the users phone number, email address, etc).

You will then need to query a few users at a time from the users contacts for this piece of information (using the ContentResolver and Contacts class), pass it to your server (as text) where it will check if they are registered, then send a message back to initial user (and possibly the match) that you found a match.

That's where you should start, and end :)

Note, you will need these permissions in the Manifest file:

android.permission.INTERNET
android.permission.READ_CONTACTS
like image 79
CompEng88 Avatar answered Sep 21 '22 02:09

CompEng88