0

I am trying to develop an application in which I want to use refer/invite friend option just like in whats-app through the phone contact list.

Like this:

Screen shot

I don't understand how to make it.

tripleee
  • 175,061
  • 34
  • 275
  • 318
Nikhil
  • 27
  • 7

1 Answers1

1

You can use Android's ShareCompat for this:

ShareCompat.IntentBuilder
   .from(this)
   .setText("Check out a new app: https://play.google.com/store/apps/details?id=<your-package>")
   .setType("text/plain")
   .setChooserTitle("Share with your friends")
   .startChooser();
marmor
  • 27,641
  • 11
  • 107
  • 150
  • It is for Share a application not for a invite a friend option which is in last whatsapp,in which you can invite all friends to your contactlist. – Nikhil Apr 25 '17 at 10:40
  • not sure what you mean, can you post a screenshot from Whatsapp on what it looks like? – marmor Apr 25 '17 at 11:26
  • It means like there is invite a friend option visible to only those who doesn't have our app and who already have our app this invite button is not visible – Nikhil Apr 25 '17 at 11:32
  • when i open whatsapp > settings > contacts > invite a friend, they're using the `ShareCompat.IntentBuilder`, like in my answer, if you're talking about a different feature please post a screenshot – marmor Apr 25 '17 at 11:35
  • ok, i see the screenshot in your question, and I need to agree with the "too broad" vote you received, this requires both server-side and client-side code, as well as interfaces with Facebook APIs, you need to try implementing this yourself, and limit your questions to specific issues that might arise – marmor Apr 25 '17 at 12:04
  • OK thank if you find any code or link related to this ,then please share it – Nikhil Apr 26 '17 at 12:07