开发者

General question about uploading and app and reffering to it

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?


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>


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


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...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜