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.
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"
}
});
The possibility of error,
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.