本文介绍了android billing inApp/subscription无法找到明确的活动ProxyBillingActivity的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想实现订阅计费功能,但是当我调用 launchBillingFlow 方法时,却出现了这样的错误

I want to implement subscription billing feature, but when i call launchBillingFlow method, i am getting error like this

这是我的样品

  BillingFlowParams purchaseParams = BillingFlowParams.newBuilder()
                    .setSku(skuId).setType(billingType).setOldSku(oldSku).build();
  mBillingClient.launchBillingFlow(mActivity, purchaseParams);

我应该在清单文件中声明显式的 ProxyBillingActivity 吗?预先感谢!

Should i declare explicit ProxyBillingActivity in manifest file? Thanks in advance!

推荐答案

您应在清单文件中声明ProxyBillingActivity,如下所示:

You should declare ProxyBillingActivity in your manifest file, like that:

<activity
   android:name="com.android.billingclient.api.ProxyBillingActivity"
   android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
   android:theme="@android:style/Theme.Translucent.NoTitleBar" />

这篇关于android billing inApp/subscription无法找到明确的活动ProxyBillingActivity的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 13:44