开发者

General question about uploading and app and reffering to it

开发者 https://www.devze.com 2023-03-19 05:30 出处:网络
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:

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

精彩评论

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