问题
I am trying to enable in app billing. I've created In-app-products on my google play console and got my license key. When I try to purchase product I get this image error.
in-app purchase error
Here is the code I use to create BillingProcessor.
bp = new BillingProcessor(getApplicationContext(),
getString(R.string.google_licence_key), this);
bp.initialize(); // binds
boolean isAvailable = BillingProcessor.isIabServiceAvailable(this);
if (!isAvailable) {
// continue
Toast.makeText(getApplicationContext(), "YESSSSSSSSs", Toast.LENGTH_LONG).show();
}
btn_bill.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Toast.makeText(getApplicationContext(), "CLICKED",
Toast.LENGTH_LONG).show();
// bp.purchase(BillingActivity.this,android.test.purchased");
bp.subscribe(BillingActivity.this, "xyz"); //, "DEVELOPER PAYLOAD HERE"
}
});
回答1:
The possibility of error,
- Need to upload app on the app store for the beta, alpha or live version at least once.
- Uploaded app on play store app version and testing app version should be same,
- Please verify created product id and requesting product id same or not,
- Also finally verify product are active or Inactive, If Inactive then active it.
来源:https://stackoverflow.com/questions/52361216/in-app-purchase-error-while-retrieving-information-from-server-df-aa-20-andr