1

I am using sharing intent to share my apps link to users via whatsapp,gmail,twitter...etc..

For example if the link is market://details?id=com.imangi.templerun&hl=en

It just gets posted as plain text and is not clickable.

I tried using http://market.android.com/details?id=com.imangi.templerun&hl=en But the user has to choose another option after clicking the link such as OPEN WITH Chrome or Playstore...

What i want to accomplish is once the user clicks, the app should open on the play store... Any suggestions and help would be grateful .. Thanks.

kaushik reddy
  • 167
  • 3
  • 16

2 Answers2

1

Have a look at this link at stackoverflow. You willget answer to your question. market:// is not clickable by default. You need to implement click event for view containing this text.

Community
  • 1
  • 1
seema
  • 991
  • 1
  • 13
  • 27
  • I am posting the link to users via whatsapp or gmail.... So i cannot add event handlers for it or use startActivity....... now u can have a better understanding i guess... @seema – kaushik reddy Apr 24 '15 at 18:11
1

Try this code to open url directly in play store:

String url = "http://market.android.com/details?id=com.imangi.templerun&hl=en";
        Intent i = new Intent(Intent.ACTION_VIEW);
        i.setData(Uri.parse(url));
        i.setPackage("com.android.vending");/* Play store package name */
        startActivity(i);
Vikalp
  • 2,051
  • 4
  • 18
  • 24
  • I am posting the link to users via whatsapp or gmail.... So i cannot add event handlers for it or use startActivity... @Vikalp – kaushik reddy Apr 24 '15 at 18:13