In-app billing library in android enterprise - android

I have some troubles about using in-app billing library v3 in managed devices using android enterprise
In my public app I have two sku objects (subscription items) to be purchased, those objects should load as alert dialog when the app starts, but currently any sku object doesn't load, checking logs I found this message: Google Play In-app Billing API version is less than 3
Doing a research about this issue, I found that probably it could be that there is not account signed up on google play store, it make some sense, because android enterprise generates and signed up an bot account in every device registered, ex: android12312#android23131.com
Another possible solution is update de google play store app, but I'm not sure if I can do it, I suppose that android enterprise does it automatically.
Also, I tested public app in my personal device (it is not using android enterprise) and it loads sku objects correctly and this is reinforcing google's account theory.
Have you ever faced this issue before? I want to know how you solve it or any contribution is welcome. Thanks

Related

Android - Testing in-app subscriptions?

I'm currently trying to test in-app subscriptions using the In-app Billing Version 3 API. I have downloaded the TrivialDrive test project and successfully tested in-app purchases using static responses (android.test.purchased etc). The problem I'm facing is that static responses are only supported for testing in-app purchasing NOT in-app subscriptions. The only viable way I have found so far to test in-app subscriptions is to publish the app as beta on the developer console, assign a tester email and then download the beta apk via the opt in URL. This is a slow process as it takes a while for every iteration of the product to be published. Is there any way where in-app subscriptions can be tested in a more 'classical' way? i.e. insert breakpoints in Android Studio and see what is actually happening? Am I missing something? Thanks in advance!
about testing you don't have to upload an apk everytime to the playstore and download it, you have to do it once
then you can configure you app to signed everytime you run it on you device doing that you can see the log messages by the tag you specified
hope that helps :)

Authentication requied. You need to sign in google play account. in in-app billing

I have an error
Authentication requied. You need to sign in google play account.
while testing in-app billing on my device with testing account.
I have implemented in-app billing v3 and i have uploaded signed apk in developer console as draft apk and running higher version signed apk in my device.
You need to login into Play with the same account which is added as Test Account into developer account.
From Testing Your In-app Billing Application
5 . Login to the test device by using a tester account. Test your In-app Billing application by purchasing a few items, and fix any issues that you encounter. Remember to refund the purchases if you don’t want your testers to be actually charged!
As you said you logged in with the same user id, then problem might be Getting “Authentication is required” when trying to access the market
It might be a temporary error.
I just implemented the v3 billing API in one of my apps and got the same error message. I followed the TrivialDrive example and uploaded my app for testing. Last night it worked fine, but today when trying to test a purchase I got the same error message you did. I then closed the error message and retried the purchase and it was working again? It might be my implementation of Billing that is incorrect or there might be a bug in the Google example code.
I'm going to continue testing before releasing my app but I'll be interested to hear if you find a solution for your problem.
I had this same problem on my Android tablet and though I kept going into my settings to reset the new password, the same message kept coming up. Finally, I found that I needed to open the 'warning message' that was being sent to me. Only then did it 'take' the new password and allow me to use Google Play.
This problem could occur because you don`t have added the product that you are searching with the same ID added to Google Play.
Go to In-app Products menu and check the product ID or add any one.

How can I test in-app-billing with a non-published app?

I have an Android app that uses In-App-Billing to sell Account Managed Items.
I tested the app with the static response IDs and everything seems to work. I now want to test the app with real product Ids.
I created the app in the Google Play Store and uploaded a draft version of the app with the correct permissions. I now created an In-App-Billing item and published the item.
At the moment the app is unpublished. The item is created and published and I have a test account that is registered in the profile of the developer account and is the only account on the device that I use for testing. The app is signed with the same key as the uploaded draft. Edit:I'm testing with Android 4.1 && 4.03 at the moment
If I try to buy the item the Google Play Store pops up but shows a dialog with the following method: The item you requested is not available for purchase.
How can I test buying the item without publishing the app?
When you test the app, make sure you have exported and correctly signed it (not using debug key). Also make sure that you are using the correct Google account (registered test account) on the device.
Additionally, the registered test account cannot be the developer account.
Apart from this, it should work fine.
Note: Testing your own in-app purchases does require a valid credit card and actual payment.
And finally, it currently takes a few hours for market edits to propagate through the servers and show up.
It may take some time to reflect the changes on google play if you just uploaded the app and added the item there wait for some time near about 2 hr. it will be shown the item you want to purchase.
For others who reach this thread, Now it's not possible to test In-app billing with just a draft version of the app.
Draft Apps are No Longer Supported
Previously, you could publish a "draft" version of your app for testing. This functionality is no longer supported. Instead, there are two ways you can test how a pre-release app functions on the Google Play store:
You can publish an app to the alpha or beta distribution channels. This makes the app available on the Google Play store, but only to the testers you put on a "whitelist".
In a few cases, you can test Google Play functionality with an unpublished app. For example, you can test an unpublished app's in-app billing support by using static responses, special reserved product IDs that always return a specific result (like "purchased" or "refunded").
for details read https://developer.android.com/google/play/billing/billing_testing.html#billing-testing-test
You can test in-app billing by using options, look at this
Edit :
On the link I mentionned, you can see this :
Note: You do not need to publish your application to do end-to-end
testing. You only need to upload your application as a draft
application to perform end-to-end testing.
If you still can not test it, what you can do is to publish it and test it. If you think there might be bugs in your app's in-app billing, refunds are still a solution.
I'm thinking about something, on the dev site, you can see this :
Verify that your device is running a supported version of the Google
Play application or the MyApps application.
On what Android version are you testing on ?
You've to add the products(item sku) in you app product in your play store app account. The SKU you set In-App billine is not available. For testing, set the SKU androidtestpayment. Now you'll now get that error The item you requested is not available for purchase.

Configuring Android In App purchase for testing

Im new to this situation. Ive coded for Android In App purchase, and uploaded it as a draft in google play(Not published) for testing purpose. Now Ive to create some In App products there in developer console, that can be bought through my app.
My doubt is about the pricing when the app is put for testing. The price cant be set to zero. It shows a minimum of $0.99 should be there.
To test my app, how can I configure it such a way that i can purchase it freely.
Helps would be appreciated, :)
This should help you get started Testing In-app Billing.
However there is a warning:
Note: Making in-app billing requests with the reserved product IDs
overrides the usual Google Play production system. When you send an
in-app billing request for a reserved product ID, the quality of
service will not be comparable to the production environment.
And one more thing i could find out on the above topic is, its possible to add testing email accounts in the Google Play. Developer can add any number of gmail ids as testing accounts there.

Android In-App Billing Item unavailable

I'm implementing in-app billing in Android and it's giving me headaches.
When I try to buy my products from the in-app store, bang: "Item unavailable",
but if I try the android_test_purchased everything goes fine.
I made a list with 'all' the possible causes for this problem and checked each one.
Here is the list:
in Security.java, the public key should be same as the one in the Android Market account
the version of the Market application in the Device should be 2.3.4 or higher
the device you use for testing must run a standard version of the Android 1.6 or later
the application being tested must be uploaded as draft, in the Android market, and must be signed
the application installed in the device must be the same as the one that was uploaded as draft to the market
the device must have a something#gmail.com account as its primary account and this account should be defined as a test account in the Android market
the products for in-app billing in the Android market must have the same IDs as the ones displayed in the application
the in-app products in the Android market must be published
Any suggestion and modification to this list is well appreciated.
Thanks
one more point I like to mention is
The account u are using for test purchases must b mentioned as a test account in your market account
I've ran into same issue. Solution was to wait, it take several hours, perhaps one day, until published items in unpublished app become "online".
I might have the same problem. There seems to be a known issue that test accounts created after August 1st is not working.
See Known Purchasing issues from Help pages
No mention anywhere when this is resolved though..

Categories

Resources