Thomas Thomas - 2 months ago 7
Android Question

Share application "link" in Android

I want my application user to be able to share/recommend my app to other users. I use the ACTION_SEND intent. I add plain text saying something along the lines of: install this cool application. But I can't find a way to enable users to directly go to the install screen of market place for instance. All I can provide them with is a web link or some text.
In other words I am looking for a very direct way for android users to have my app installed.

Thanks for any help/pointers,

Thomas

Ton Ton
Answer

This will let you choose from email, whastapp or whatever.

try
{ Intent i = new Intent(Intent.ACTION_SEND);  
  i.setType("text/plain");
  i.putExtra(Intent.EXTRA_SUBJECT, "My application name");
  String sAux = "\nLet me recommend you this application\n\n";
  sAux = sAux + "https://play.google.com/store/apps/details?id=Orion.Soft \n\n";
  i.putExtra(Intent.EXTRA_TEXT, sAux);  
  startActivity(Intent.createChooser(i, "choose one"));
}
catch(Exception e)
{ //e.toString();
}