Search code examples
androidin-app-purchaserecurring-billingandroid-billing

android billing inApp/subscription Unable to find explicit activity ProxyBillingActivity


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

android.content.ActivityNotFoundException: Unable to find explicit activity class {com.calendargb/com.android.billingclient.api.ProxyBillingActivity}; have you declared this activity in your AndroidManifest.xml

Here it is my sample

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

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


Solution

  • 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" />