简体   繁体   English

Android Inapp 计费示例

[英]Android Inapp billing example

I'm trying to run the Android Inapp Billing Example but have apparently done something wrong since it doesn't work as intended.我正在尝试运行 Android Inapp Billing Example 但显然做错了什么,因为它没有按预期工作。

My best clue about what is wrong is that when the market billing pop-up show the title is "Sample application title by Sample Merchant" and since I don't find that text anywhere neither in the code or in the Developer Console I think that my application is attempting to connect to someone else account for payment.关于错误的最佳线索是,当市场计费弹出窗口显示标题为“示例商家的示例应用程序标题”时,由于我在代码或开发者控制台中都没有找到该文本,我认为我的应用程序正在尝试连接到其他人的帐户进行付款。

Any ideas what is wrong, I have copied in my "key" into the application as instructed in the description.任何想法有什么问题,我已按照说明中的说明将我的“密钥”复制到应用程序中。

Thanks in advance Roland提前感谢罗兰

Yeah,是的,

You're running your app compiled from eclipse so it's being signed with your development key.您正在运行从 eclipse 编译的应用程序,因此使用您的开发密钥对其进行签名。

You need to sign it with a release key and you need to be sure that in the Security.java file you've set the base64EncodedPublicKey to your android market public key (available under the Edit Profile link in the android market app).您需要使用发布密钥对其进行签名,并且您需要确保在 Security.java 文件中您已将 base64EncodedPublicKey 设置为您的 android 市场公钥(可在 ZC31B323644CE19CA 中的编辑配置文件链接下获得)。

So steps are:所以步骤是:

  1. Make sure you put your public key into the Security.java file确保将公钥放入 Security.java 文件中
  2. Export a release build of your application导出应用程序的发布版本
  3. Run adb install YOURAPKNAME to put your application on the phone运行 adb install YOURAPKNAME 将您的应用程序放在手机上

Then you will see the sample app pop up listing your application title and you as the merchant + you will be able to make real purchases.然后,您将看到示例应用程序弹出,其中列出了您的应用程序标题,并且您作为商家 + 您将能够进行真正的购买。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM