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?

Yuval
  • 1,254
  • 2
  • 12
  • 32

3 Answers3

1

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

plus-
  • 43,666
  • 14
  • 57
  • 72
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,065
  • 7
  • 95
  • 129
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,069
  • 15
  • 82
  • 110