0

My free app (which is not on the market yet) has a button that supposed to lead the user to the paid app... to do so im using:

Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("market://details?id=com.android.example"));
startActivity(intent);

the question is what do i put instead of com.android.example? Is it the name of the package that i made when i first created the project?

yogi
  • 1,327
  • 2
  • 12
  • 33

3 Answers3

1

Just put the name of the package of your paid app.

plus-
  • 45,453
  • 15
  • 60
  • 73
1

Yes, the id that Market uses is the same as the package name as it is specified in your AndroidManifest.xml file:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.etc.etc.yourpackagename">
    ...
</manifest>
Peter Lillevold
  • 33,668
  • 7
  • 97
  • 131
0

There is an older question not about the same problem but in the question-post, there is a working code which does what you want to do.

If you had simply googled "android intent to market app intent", you would have found it...

Community
  • 1
  • 1
Lukas Knuth
  • 25,449
  • 15
  • 83
  • 111