1

Possible Duplicate:
open link of google play store in mobile version android

I have a free version of my app (with ads), with a paid version (no ads). On my free version I have a upgrade button. I would like this upgrade button to go to the google play store to the page that sells my app. I seen it done before but cannot figure out how to do it.

Community
  • 1
  • 1
Ted pottel
  • 6,869
  • 21
  • 75
  • 134

2 Answers2

2

You should launch the following intent

    Intent intent = new Intent( Intent.ACTION_VIEW );
    intent.setData( Uri.parse( "market://details?id=<YOUR_APP_PACKAGE>" ) );
    startActivity( intent );
Robert Estivill
  • 12,369
  • 8
  • 43
  • 64
  • Thank you for your help, Where it says market, is there a url to go to other built in apps on the android, like the calendar? I don't need to do this know, just wonderinf. If so do you know where I could find more informtion on this subject? Thank you – Ted pottel Nov 19 '12 at 15:27
  • You can go to any app that is hosted on Google Play. You just need to know it's package name. Not all of the built in apps are available for downlod on Google Play though. – Robert Estivill Nov 20 '12 at 19:14
1

You will have to use an intent to launch the browser/play store.

Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.google.com"));
startActivity(browserIntent);

In the place of Google.com put the URL of your application. This browser intent will give the user an option to select the play store instead of the browser

jcw
  • 5,132
  • 7
  • 45
  • 54