Reputation: 167
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.
Upvotes: 1
Views: 1896
Reputation: 2161
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);
Upvotes: 1
Reputation: 991
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.
Upvotes: 1