小编J.D*_*.D.的帖子

Android应用内结算 - queryInventoryAsync返回0结果

我在使用应用内结算流程时遇到了令人沮丧的问题.我在开发控制台中创建了一个新的应用程序,添加了一个名为"P1"的inapp产品,该产品目前处于活动状态; 我上传我的应用程序在Alpha版本,存储,然后提升到测试阶段,添加一个测试帐户,并安装在设备(平板电脑)的APK测试帐户,另一个dev的帐户.

现在,我想查询商店以获取非拥有skus价格等信息.这是我的活动代码:

private void istantiate() {
     List<String> tmp = new List<String>();
     tmp.add("P1");
     final List<String> skus = tmp;
     mHelper = new IabHelper(mContext, base64EncodedPublicKey);
     // enable debug logging (for a production application, you should set this to false).
     mHelper.enableDebugLogging(true);
     //create listener
     bListener = new BillingListener(mHelper, mContext);

     // Start setup. This is asynchronous and the specified listener will be called once setup completes.
     mHelper.startSetup(new IabHelper.OnIabSetupFinishedListener() {
         public void onIabSetupFinished(IabResult result) {

             if (!result.isSuccess()) {
                 // There was a problem.
                 return; …
Run Code Online (Sandbox Code Playgroud)

android in-app-purchase in-app-billing google-play-services

7
推荐指数
2
解决办法
4448
查看次数