Problem: How to place a Market link inside the Android application?
Description:
While answering on StackOverflow, I came across one question on placing market link inside the application and I thought it’s very useful and I thought to document it. You might came across the same problem.
There are many ways to put link but what about to place the link with market application URL? So here is the solution.
Solution:
TextView txtView = (TextView) findViewById(R.id.textView1); Pattern appWordMatcher = Pattern.compile("b[A-Z]+[a-z0-9]+[A-Z][A-Za-z0-9]+b"); String appMarketURL = "market://details?id=com.digicorp.twitrivals&hl=pt_PT"; Linkify.addLinks(txtView, appWordMatcher, appMarketURL);
For more info: http://developer.android.com/resources/articles/wikinotes-linkify.html