I am working on learning in-app billing but I am having a problem with the google's in-app billing example, the Dungeon one.
I have already set up the application, added my public key, and changed the API_VERSION to 1 in the makeRequestBundle().
I have already exported and signed the application and uploaded it onto Google Play and saved it as a draft with a few pictures and activated the apk. I also added both the sword_001 and potion_001 as published in-app purchases!
Next I installed the signed app onto my phone but when I try to purchase either the sword or the potion I get an Item unavailable error
The item you requested is not available for purchase.
I even tried on a different device to make sure it wasn't because developer's can't purchase their own products, and I get the same message on both devices.
What have I missed?
Check your versionCode. It can't be higher than the last published/unpublished version in any of your distribution channels (prod/beta/alpha).
In app billing seems fraught with pitfalls, but this is what I found that affected availability of items for purchase and also suitability of application:
My code for what it was worth was strongly based on the Google Android demo, but I stripped out a lot of the complexity. I have a feeling that having got it to work a better result would be produced by writing it all again from scratch.
I got the static test product ids going first.
Despite what the documentation says, it seemed to me that the purchase item(s) must be published, even when using a test account. Mine didn't work when they weren't, anyway, and I waited quite a long time to see if they would start to work as others have suggested - they still didn't.
You (I anyway) can't publish a purchase item without publishing the app, so what I did was upload and publish the app, create the purchase items, publish them (big button at the bottom of the page), then unpublish the app again. This seems to leave the items published.
The app must be signed in the usual way (I did this by exporting from Eclipse) before uploading, but what isn't so obvious is that the app you load to the mobile MUST also be signed in the same way - ie a (debug signed) version loaded to the device by Eclipse - run or debug - isn't going to work.
They also both need the same version number, I think. Not 100% sure. If so that would unfortunately kind of imply that customers with old versions installed can't purchase anything without upgrading.
When the app is uploaded to Google, it can take several hours before it becomes available and you get all the right responses for the in-app billing. I find 1-2 hours typically.
I suspect the other comments on this subject about whether you use a gmail or googlemail test account might be red herrings, but for what it is worth, my test account is gmail.
I did come across a useful little note on the internet somewhere about how to change your primary account on the mobile without having to do a hard reset (and consequently losing everything), but unfortunately I haven't managed to find it again.
What I did find though is that one can have several google accounts on the mobile, and then select the one to be used by Google Play.
Hope this helps somebody. I have to say its a pretty complicated system, with not many switten down answers, and I nearly gave up on it.
If your app are on closed alpha testing, you have to sign in with your test account to Opt-in URL; https://play.google.com/apps/testing/{your.app.namespace}
My experience on this error is:
Make sure to upload the signed APK to developer console.
Make sure to install the signed APK on your device not launch the app in the debugger.
Make sure to create a test account in your developer console.
Make sure to sign in your device with your test account.
Make sure to create in app billing in your developer console and finally activate the item from the console!!! (this is the one that got me after fully following google's tutorial)
It's no longer sufficient to just upload an unpublished draft apk to test in-app billing. What you need to do is upload an apk to the alpha or beta apk section on the Developer Console. Then, you need to publish it. If you also have a draft apk in the Production APK section, be sure to delete it before you publish. Otherwise it will be available to everyone.
Publishing an alpha or beta apk makes that apk available to only those testers that you specify/allow.
Here is Google's documentation on this:
https://support.google.com/googleplay/android-developer/answer/6062777?rd=1
Well I found a solution to my problem. I wasn't able to get Google's in app purchasing example to work but I was able to get this InApp Billing Tutorial to work using the steps I mentioned in my original post.
If nothing else this may be helpful to someone to see all of the steps that need to be done to test one of the in-app billing examples.
Also had this problem for a couple of days and searched around a lot. I found this guy who said deleting the app and then reuploading fixed his problem, and that actually worked for me aswell.
Try that, delete your app from the developer console entirely. And reuppload a new signed apk and set it up all over again
Publishing the app did the trick for me(and leaving it published (!)). I had to wait a bit for Google to update their database as well, as mentioned elsewhere, changes on Google Play are not immediate.
Anecdotal Supplement: If you have an existing app in the portal already and you want to test a signed version, but not upload it into the portal for distribution. Do the normal steps to build a signed version BUT use your latest version code that is uploaded into the portal. You will will be able to do a quick and dirty test of purchasing (you can't upload this version on the Google Play portal, but it's a means to an end for a localized test (or even as a way to allow side loaded distributed versions/flavors that use Google Play for billing legitimately.)
3:)
Check if your device have more than one account then remove other accounts and keep the account you have entered in play console then it will be solved.
Related
Inb4 its a duplicate, I know the question is, but they are all older and none seem to help with my issue. Mine seems pretty cut and dry. I have an app that I build with a set of keys and upload to my play console. I have "google signature" enabled so they sign my apps as well. I have products enabled that work when the app is downloaded from google play test track. The SAME EXACT CODE BASE, signed with the SAME EXACT SET OF KEYS I used before uploading to the Play console does not work when I build locally and push it to my device. It says "This device is not configured for transactions" or something along those lines. I'm trying to build out my purchase flows but this is really obstructing me...
Everything is set up according to other answers. Same version code, products active, test track/alpha release are both available. Hell, the purchase flow starts fine when I download the apk from the play store, just not when debugging in AS.
I don't think this is a true answer, or maybe it IS and my symptoms are a bug on googles part, however I seem to have resolved my issue. I'll confirm my answer if this continues to work throughout the day.
For anyone else having a similar issue to me, delete all storage/cache for the app on your phone, then delete the app (NOT USING THE PLAY STORE). Now, install the app from your internal test/alpha track (FROM THE PLAY STORE). Run the app, test the purchase. If it works, close the app and delete all of its storage/cache and the delete the app (NOT USING THE PLAY STORE). At this point you should be able to upload test builds to your devices using Android Studio and have inApp transactions work. Idk why or how this works but YOLO, If it continues to work ill come back and verify this answer. Hopefully this is something google can get streamlined, or maybe I'm doing something wrong and just don't know it. Feel free to answer and I can change my correct answer.
I have been trying for several weeks now to get the Google Alpha / Beta testing functionality on the Play Store to work with no success. As far as I can tell I have followed the process but clearly something is not working from my side. I hope someone on SO can tell me what I'm doing wrong.
I have created both an Apha and Beta testing community.
I have added the Beta testing community to the Beta testing section that relates to using Google+ communities to test. My Beta testing community does have members added.
Although I have an Alpha testing community, none of the Alpha testing methods are currently enabled.
On my test device, using a Google account that is a member of my Beta testing community, I only ever see the version of my app that is currently in Prod. I have spent days waiting just in case it takes a couple of days to show up (at least a week which I assume should be long enough).
I need to test the release version because I am trying to test some inapp billing functionality that I had to change due to security warnings from Google relating to my current Prod version.
BUT: if I load the release version of the app directly (instead of downloading from the Play Store) I can see that it is seeing this account as a "test account" because when I test the inapp billing I get the correct message telling me that the subscription will renew every day but I won't be charged. However the Beta version of the app never appears in the "BETA" tab in the Play Store.
I have noticed something "strange" (possibly) in the developer console though: When I click on the "Beta Testing" tab it shows 10399 supported devices and 0 excluded devices for the Beta app. However if I click on the line of the Beta app where you can promote the app etc, the details that are then displayed indicate 0 supported Android devices. Why would this be? This seems to be conflicting information on the console.
Note: The current Prod version of my app was developed using Eclipse. I have recently converted to Android Studio and this is my first upload using Android Studio.
Where else should I be looking to get my app to appear in the Play Store
Thanks
I was just setting up the Beta testing release for the first time and couldn't make the app visible in Play Store. Found the reason in Play Console Help:
After publishing an alpha/beta app for the first time, it may take a few hours for your test link to be available to testers. If you publish additional changes, they may take several hours to be available for testers.
After about 35 minutes the app was published.
As this might not be the issue mentioned in original question, it might help someone.
In my case I had published the Beta version and had created the testers but not linked them together. What I had to do was:
Go to manage releases
Choose a testing method - Closed Beta Testing
Then when testers list shows, make active the group of testers you would like to test the app.
Save
Get Opt-in URL link and paste it in a new tab (you should be logged in to google)
Then click at the "Become a Tester" button
You should now be a tester and ready to go.
#Important If you still can not find the app by searching in Play Store just copy the "Opt-in URL" into your tester phone's browser and you should see the app.
Hope it helps
What solved this problem for me was clearing my Play Store app data.
In my case, I had already been on the testers list for days, already accepted the invitation link, and already gotten testing working on other devices. But, the Play Store still wouldn't show the beta version of the app on this particular device.
I went to "App info" for the Google Play Store app, "Memory", then "Clear data". Then I re-opened and was able to see the beta test app.
Disclaimer: Use with caution. Clearing your app data may remove some important information. I haven't personally experienced any problems with it, but that doesn't mean you won't.
The suggestion from #Edgehog to use Open Testing solved my problem regarding being able to see my app in the Beta tab of the Play Store.
I have not found a reason yet why the closed beta testing (using emails or groups/communities) would not work.
Make sure you also check this answer
browser cache
an actual active "testing track"
We are having the same problem in my company. Currently we are investigating possibility that maybe first install on beta channel installs prod version and updates to beta channel version when first app update is released on beta channel. It is weird workflow but the comment on Play Store "Future updates will include beta versions" supports this
There are a couple of reasons why this might happen but admittedly we did not 100% confirm this.
1) One reason is that you are viewing Google Play under another account that is not on the beta tester list.
2) The other might be an issue (or feature) with the release management. Added a user to an existing closed beta release list. Changing a list does not activate or force a Save for the "Managed testers" section. After we edited another field (e.g. feedback channel) then the Save button became active and we clicked save. This might only then propagate changes. We cannot 100% confirm this was the issue we were facing but our experience points to this.
I am new to the inappbilling integration for android.I am using the develop the following link
http://developer.android.com/training/in-app-billing/preparing-iab-app.html#GetSample
and also TrivialDrive import my eclipse and generate to the apk and export apk in googleplaystoreconsole of drafts not in published and also created to the product item and put in product id to my activity and
add to the String base64EncodedPublicKey="RSA public key". finally run the code showing following screen
also ways showing this screen .i didn't understand what is going on rightnow.please help me anyone known and idea about this advance thaks to all.
Had the same problem. I contacted as well and got this response from Google
Thank you for contacting Google Play Developer Support and reporting the behavior you're seeing with in-app billing.
We recently made some changes to our systems and we are now requiring an app to be published before testing. We are currently recommending to publish your APK to the Alpha channel in order to test licensing, in-app billing, and expansion files. There is no need to create a special testing group in the Alpha channel to test these features, however the app must be published and not in draft mode.
We apologize for the inconvenience and are working to update our documentation to reflect these changes.
After publishing my APK to Alpha (as I haven't launched yet) and waiting an hour or so, my IAP test purchases started working again.
I am trying to set up Google Play licensing with my app. I have followed the documentation precisely, yet I still can't get it to work:
the LVL library is the latest version available in SDK Manager
I copied the license check implementation exactly from the sample app
I copied the BASE64 key of my app from "Services and APIs" in Google Play to the BASE64_PUBLIC_KEY field and made sure countless times it was copied correctly, contained no white spaces
I uploaded the app to Google Play as alfa, also tried uploading it as beta and production draft
I tried running the same compilation of the app both signed with a debug key and the key with which I signed it for Google Play(the exact same apk)
I tried setting different static test responses on Google Play
Every time I run the app on any device where I'm logged to my developer account, I always get NOT_MARKET_MANAGED error. I've read through countless forums but none of the answers helped. What else can I do?
I had the same issue and I found this note on developer.android.com:
Note: Previously you could test an app by uploading an unpublished
"draft" version. This functionality is no longer supported; instead,
you must publish it to the alpha or beta distribution channel. For
more information, see Draft Apps are No Longer Supported.
Here's what I did:
Signed and uploaded the apk file. I uploaded as beta, but I don't think it matters.
Published the app. Note, I didn't promote it to production. I used the dropdown in the top right corner. You may see the option "Why can't I publish" and no "Publish" option. If you click "Why..." it will explain what you have to do first. In my case I had to upload at least 2 screenshots.
You can unpublish straight after publishing using the same dropdown.
Give it a good few hours, may be a day.
Next day my app started to receive responses according to my "Licence testing" setting in the developer console.
I'm a developer and i was thrilled when I was watching Google IO 2013 and learned about the new Beta testing feature. So I created a Google+ community and a google group and placed the testers in there (me included).
All we get (the developers and testers) when we visit the https://play.google.com/apps/testing/com.package.stuff
is this:
Is there any trick I am missing? I would really like to use this feature.
I know there are alternatives like https://testflightapp.com/ but I'd rather keep my app under this environment where I can "promote" the Beta apk to the Production phase and so on.
I had this same issue. The reason the link is not working is because the app must be published before the link will be active. I repeat the app must be published, this does not mean there must be an APK in production. On the top right of your applications developer console page there is a drop down menu that allows you to publish the app. That link will become active immediately and your app will be available in a few hours to your testers on the Play Store.
First of all you need to create or have a Google+ community.
The process is:
Create a new Google + community. It's required to have testers through Developer Console.
Register this community in Google Play Developer Console
Invite your beta testers to this community.
Wait 8-24 hours before sharing the link
Share the link with your testers
Verify that your app is published for Beta Testing
If everything is right, the link should show something like:
I'm having the same problem, the link simply doesn't work, 36 hours after publishing. Might as well not even provide the alpha/beta features if they cripple the developer's ability to move fast...
Anyway, I'm sharing some information provided to me by Google Support, hoping it'll be helpful:
Ensure that you have added a valid Google Group email or Google+ Community URL to the Developer Console and that you are included in the group/community. Once the group/community has been added, the name of the group will display in the “Manage list of testers” link in the testing tab. (Please note when adding a Google Group you need to enter the email address and not the URL).
If you wish to use a Google Group in a Google Apps domain, the Developer Console and Private Channel must be enabled for your domain in the Google Apps Control Panel. More Private Channel info: http://goo.gl/DLGNe
An app must be published for several hours before the opt-in link will become available to testers.
Currently, testers must have only one account on their device. Devices with more than one account will receive the production version of your app. (Please note this requirement is temporary. Stay tuned for updates).
2015 and the alpha/beta testing is, at best, 50% working. About 50% (23 of our 60+) beta tester never gain access to the app via the provided link. All the others have no trouble at all installing the beta app and receiving updates. No rhyme or reason. Single account on their device, some with gmail accounts, some with private email. It's a mixed bag of who gets access and who doesn't. In all cases, once they accept the invitation to join the group they have full access to the group. But they get a 404 when trying access the app. Not worth the trouble. Our fix is to give the testers access to to our private server and pass out the beta versions that way. Updates aren't automagic, but the testers can get the app hassle free
I had the same problem and alpha testers had to get into my Google Plus Community for alpha testers.
I had the same problem (404 error on tester's link), but the cause was different from the one shown in buckson18's answer: in my case the app was published, but the user didn't join the testers Google Group, although he received the invite.
After the user joined the group, the page showed correctly.
Hope this can help someone...
I was also facing this issue. The problem was that Google group was not added. Another important thing to take care is that the account being used for developer console must be member of google group being added. I couldn't find this anywhere in the documentation.
I have been using Beta testings for a couple of years and its very unreliable. Sometimes it works, sometimes it doesn't. Now they have Open Beta Testing. I tried it today for the first time, and though I followed all the instructions, but it still doesn't show the app in the app store, unless I sign in, which makes it regular old style beta testing. Its much easier and hassle free to use HockeyApp to distribute app for testing.
After wasting hours with Goolge's Alpha and Beta versions, I always end up putting my app into production so that I could keep my testers. Its already hard to convince large number of people to do the testing, and then keep asking them to go through half working or not working procedures to download the app.
I solved it by go to https://play.google.com/apps/testing/[app package] on the device and then click that link and open it with google play
One thing that seems to have worked for us is to use the "opt-in URL" the Play Store developer console provides under "App releases" which should look like:
https://play.google.com/apps/testing/com.yourappname.android
This DIFFERS than the URL you see if you're already approved as a tester and visit the app's page on the Play Store in a browser. Ours looks like this:
https://play.google.com/store/apps/details?id=com.yourappname.android
Net net, use the 1st and not the 2nd. Good luck!
It should be noted also that the link is case sensitive so if you've got https://play.google.com/apps/testing/com.someAppName - if you put https://play.google.com/apps/testing/com.someappname it'll tell you it's not available!