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 :)
Related
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
From what I understand reading This link. It appears to me that the only way to test in app purchase is to write the complete code for in app purchase. And then do a proper build. Upload it to beta release. And then download the app via the opt in link.
But how do I develop it in the first place? Am I expected to write some lines of code and then do a build and upload it? That is a huge turn around time. Is there no way for me to have some test account that I can sign in go google play (on phone) with and then just make purchases?
Currently, my code already handles the products
android.test.purchased and android.test.canceled. How do I make it so that I can test my own products Ids? Currently it just says the product you are requesting is not available.
Google allowed to test your in app purchase in for dummy products like you mentioned android.test.purchased. To test real products you must have to deploy application in beta release at least. Following article will help you in detail :
An Android Studio Google Play In-app Billing Tutorial
Hope it will help.
You need to publish your application in beta version in play store to review the application. Without reviewing your application, you cannot test app purchases. After the review you can test your application without redeploying it to play store.
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.
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.
I am working with Amazon In-app-purchases for Android on flash using native extentions. So, I have implemented purchase flow in sandbox ( I was using their file InAppSDK-SandboxData.json for debug). But now, I have an amazon account. I have created purchase items in my developers account, and I want to test flow of buying them.
String requestId = PurchasingManager.initiatePurchaseRequest(product_id);
but it throws an exception, it try to open file "InAppSDK-SandboxData.json", but I have deleted in hope that it will go to product servers, but it does not. I found that I can only make purchases when I will commit my app to Amazon app store((
So, how can I test my real payments to product servers and how can I debug this process?? Thanks.
Right now, you can't :(
I've implemented Amazon In-app-purchases for Android in my last project and the only way you have to test is using InAppSDK-SandboxData.json. Once everything works fine then you commit the app to Amazon App Store and they'll debug for you.
My advise, if it's working fine using InAppSDK-SandboxData.json and you can't wait a month or two (I'm sorry but I can't tell you anymore because I'm still under NDA. I'll edit my response soon), you don't be afraid and commit the app. I did it ;)
UPDATE:
It's official right now, you have a test app in the developer site, you only must use it ;)
Now you can test in-app purchasing using "LiveApp testing" before publishing to customers.
Check this link
https://developer.amazon.com/public/resources/development-tools/live-app-testing/docs/getting-started