I do the first time the application in which there are built-in purchases, and so everything was set up under the article on habr , sent to beta with a release signature, added products and they are active, added testers to all lists. Began to do next:
Presenter
@Override public void payment() { if (inAppBillingService != null && isBillingAvailable.get() && repo().isRemoteOperationAvailable()) { InAppProduct product = view().getPrices().get(0).getGenericProduct(); try { Bundle buyIntentBundle = inAppBillingService.getBuyIntent(API_VERSION, context().getPackageName(), product.getProductId(), product.getType(), UUID.randomUUID().toString()); PendingIntent pendingIntent = buyIntentBundle.getParcelable(BUY_INTENT); view().startPayment(pendingIntent.getIntentSender()); } catch (RemoteException | IntentSender.SendIntentException e) { e.printStackTrace(); // На всякий случай - это для тестов ;) } } } View - Fragment
@Override public void startPayment(IntentSender sender) throws IntentSender.SendIntentException { startIntentSenderForResult(sender, REQUEST_CODE_BUY, new Intent(), 0, 0, 0, null); } The code executes and an error appears.
The onActivityResult returns the code BILLING_RESPONSE_RESULT_ITEM_UNAVAILABLE == 4.
If you download the application from the market then the payment works out !!!
Now the main question is - does anyone know if it is possible to debug an application with in App? because lay out and wait 2 hours to see the result - this is hell: (
Ps.
- Everything is signed with a release key in Gradle (info 100%)
- Email testers added for betting and payment test
- versionCode and versionName match
- Prilaga published
- API Version - 3
- SKU - true (checked over dofig times)
- In the manifest, there is permission and the aidl interface is added to the project.