Google in app billing sample app: "error item not found" - in-app-billing

I'm trying to setup the in app billing sample applicaiton.
I've uploaded it to google play as "unpublished"
I've setup the sword_001 item and published it.
Now I'm trying to buy the item from the sample app on my phone and it always says "item not found"
any ideas?

If you follow the steps provided here :
http://developer.android.com/guide/google/play/billing/billing_testing.html
then you should able to do in app billing. few thing i found was :
1. You need to set up a test account and it is NOT your developer account
2. Make sure you publish the in app product
3. Third step is to wait for a while or longer for google to update their server
first your apps will return item not found, and if you wait, then they will change to your item is found but unavailable for purchase, and if you wait for another hour or so (i don't know what time exactly) then your product should be accessible.
Good luck

My problem was just so simple:
i've just set the item on Google Play from "not activated" to "activated"

Related

Sorry, this action is not available in simulation

My test invocation name is "Mrs Tang", so i input "Talk to Mrs Tang", but it responds "Sorry, this action is not available in simulation"...
Does anybody know How can I resolve this error?
According to the doc:
Turn on the Web & App Activity, Device Information, and Voice & Audio
Activity permissions on the Activity controls page for your Google
account. You need to do this to use the Actions Simulator, which lets
you test your actions on the web without a hardware device.
And I had do what Jeremy Gordon suggested. To add a second google account in the GCP IAM console with a viewer action permission and then login with this second google account in an incognito window for the web simulator to work.
I had a related problem (I could test with my main developer account, but not my test credentials). I eventually got it working with the non-primary account.
The missing link for me was that when I was viewing the simulator, I was actually signed in to two accounts, my primary google account (developer account, shows up in the main frame of the page, upper right corner), and the account I authorized when 'starting' the simulator (email address shows up in the simulator frame), which was my test credentials. The second test account repeatedly gave me the "Sorry, this action is not supported in simulation" message, until I:
1) Added the test account as a Conversation API Viewer & Client in GCP IAM console
2) Visited the 'create link' (the one that comes up when you click share) in an incognito window, and signed into the secondary account there such that I was signed into only one account in that incognito window.
After that, invocations connected to the app.
Make sure you are logged into the same account you used to deploy the test action and that the deployment has been done within the past half hour or so. If you have not set all the information on the Actions on Google Console, you may need to use the invocation phrase "Talk to my test app".
I think sometimes I run into the same error. I get past it by toggling the Active switch off and on.
Same problem I encountered. You must be logged in via the secondary google account. Do logout from the account and login via the account that is paired with api.ai.
why I can't use google action in web simulator
I got this to work by saying "talk to my test app" or typing it in to the simulator prompt, that triggered my app to start in the simulator.
I had the same problem. I needed to set the location first (it defaults to Google-Headquaters), if you are in some other region (like in germany as i am).
Then go on with "Mit meiner Test-App sprechen" (Talk to my test app), or whatever it is in your language!
I did not get this message on my invocation, but on my my second input:"Sorry, this action is not available for your app.".
It turns out the simulator had left the conversation right after the invocation (and it did mention that in the small print).
This happened because I returned a FinalResponse for the invocation. And a final response is pretty final, it will terminate your conversation.
So, after a FinalResponse you can only get back in your action/conversation by a new invocation or a deep link. If you want to suggest questions/inputs, then you should return ExpectedInputs.
You might need to turn on Web & App Activity to let group members use some Google Assistant features.(if you are using organizational account)
https://support.google.com/assistant/answer/7219584?hl=en
If you are using any organization's Google Accounts then there might be an access issue. So use your own personal Gmail account.
Take a look here, organization's might not be given you access. So use your personal Gmail and follow the Docs, you will able to create your agent/ actions and able to test it with simulator as well as in android device.
At time of testing the Google Action you need to set the location to the country which you selected while developing or submitting your Google Action.
By default US is selected in testing but if your action is for one particular country only then you need to select that. You can see in image the field where you can select location

can't get In-App-Purchase hosted content to be actually hosted

I have an iPad app with In-App Purchase that used to host its content with Urban Airship (a pox upon their house). Now I'm trying to convert this to use Apple's hosted content.
I've created a .pkg file for one of my content items, and used Application Loader (multiple times now) to upload the content. The package passed validation, I clicked "Deliver," and I watched the progress bar as it was "Uploading package to the iTunes Store." In the "Hosted Content" tab for this item, "Host Content with Apple" is clearly checked, and the "Hosted Content Package:" well shows the standard package icon.
Yet, when I look at the same app on iTunes Connect, and go to In-App Purchases and view the same content item, it says: "Hosting Content with Apple: This feature is turned off." (And no hints are provided here as to how one might turn it on.)
In my code, when I get back the SKProduct from StoreKit, I find that downloadContentVersion and downloadContentLengths are both nil. And when I purchase it anyway using a test account, I get a SKPaymentTransaction whose .downloads is also nil. And if I quit and relaunch Application Loader, the "Host content with Apple" checkbox is now unchecked. This is all probably related to the fact that Apple doesn't realize they are now hosting this content.
Perhaps life is more difficult because this is not a new app or new content item; both of these were approved long ago, and I'm trying to update them to the new model. But I certainly don't want to create a new app just for this. What's the key step I'm missing that makes the Apple servers actually host this content?
I had to "review" my "iOS Paid Applications Agreement". This means going to iTunes connect - then "Contracts, Tax, and Banking" click the "Request" button and accept all the changes...
After this every problem was gone. Got the answer from this stackoverflow site:
Updated iOS Applications Agreement
My problem wasn't similar to yours but I have read similar so posts with the same solution that did it for me. Try it out. Hope it helps you or anyone else :)

Add In-app Purchase Item after app available on App store without updating app

I uploaded one of my app before couple of weeks and it is available on the App store now. It has 2 In- app purchase. In app purchase logic is totally from remote server as we wanted to add new pack without updating binary file so we did everything on server side.
So, here is my actual question. Now I want to add new pack. so here is my confusion/question.
I made on inventory.xml file for all the In app purchase id for validating in app id. and I am displaying only those Items which are valid from App store.
Also, when user purchase any pack I am downloading contents from the server and they will have new pack after successful purchase.
So, how do I make it available to Apple for submission purposes without also making it available to the general public? That is, if I add the new pack to the inventory.xml file which lists all the packs, everyone will be able to see it before Apple even approves it. But if I don't add the new pack to inventory.xml, then Apple will have nothing to look at in order to approve it.
Thanks in Advance.
When you submit new in-app purchases to Apple, you upload screenshots and descriptions of the new content to iTunes Connect. That should be all they need for review, and you can wait to update your inventory.xml file until they have approved the new content.
I found answer for this question from other sources. So I am posting it here what I have found and I believe that is the correct answer. This is my opinion it may be wrong..
So, in my situation I can add new item in my inventory.xml file as well as in iTunes account and put it new item for the review.
The reason why General public (users) will not see my new pack because I have only show valid products which I got from SKProductResponse. So in the review process it will not be valid product and it would not show in the list of available items to the users.
Now, We and Apple tester can see it because we both are using In-app test user account to test new items and I believe In-app test user account returns all the product as valid.
So, from this flow I decided to move forward with this and hopefully it should work.

In-app Purchase Loop Hole

OK so have a problem with the whole in-app purchase review process and hope someone can shed some light/experience on it.
We have a project which is a magazine for the ipad. Each issue requires an in-app purchase before it is downloaded. The issues are served from an XML feed when a new one is published.
The problem is, how can we have Apple review an in-app purchase without displaying the new issue. They wont be able to see it in the live binary. If we publish the issue we have to say "unavailable", which looks extremely unprofessional to the customer, until the in-app purchase is reviewed.
We dont want to have to publish a new binary each time a new issue is published as thats a pointless exercise for the customer
Thanks, any suggestions apart from change message to "coming soon" would be apprciated. The only other thought we had is a flag in the app settings which displays "unavailable issues"
If you login to your iOS developer account, you'll find this Getting Started with in App Purchase pdf file, which has information that you'll need in your setting up with your iAP item.
Specifically, I think what you need is an item belongs to the category named Subscriptions. This should solve your problem.
You can use consumable purchases, i.e. right to download 1 article. 5 purchases - 5 articles.
Or, give a user subscription for month or so.
You could always just keep some kind of "sample" issue available for the purposes of the user demoing the software.
That, or a few select pages from the active issue could be specified as "demo pages", as in they would be viewable from a demo version of the software.

In App Purchase An unknown error has occured

I have created a test app that has in app purchasing. I am able to connect to the store and verify my product ID's. I then use my test user account to purchase a product. And guess what... it works... the first time. If I try to use the test user account to buy another product (the same product or a different one) then I get a pop up that says
"An unknown error has occurred"
with a "Cancel" and "Retry" option. If I retry then I get the same error. After hitting cancel I get the error:
Error Domain=SKErrorDomain Code=0 UserInfo=0x161180 "Cannot connect to iTunes Store"
Any ideas?
Update:
I have found a work around. For some reason apple does like Canadian test users. I switched to using US test users and everything worked.
I also found that after an OS upgrade I needed to delete the app off my phone and do a clean build to get things working again.
So the issue here doesn't have anything to do with wether or not your iTunes connect user is in Canada or the US. It's kind of a strange bug on Apple's side.
What happens is if you sign-out of an iTunes connect user in Settings.app and then sign back in with that user in Settings.app that test user is somehow poisoned and is broken permanently. You will no longer be able to use that account for testing.
To avoid this sign-out in Settings.app, but don't sign back in until you are inside your application and it prompts you during purchase.
I am having this EXACT same problem. I have some more details so let's get to the bottom of this!
When I create a new tester account, the first purchase always works. The second time gives me an alert that says "You've already purchased this but it hasn't been downloaded..." on the device. Every time after that I get an "Unknown error has occurred" message.
My NSLogs gives some more info. The first payment is normal. But it gets weird for any payment attempt after that. After I send the payment request and make myself a queue observer, I see TWO transactions in the purchasing state... weird, why two? After I get the error and tap cancel, I get two transactions in the failed state sent back. Why would I get two responses when I only sent one payment request?
I am using a consumable product type that the user should be able to purchase over and over again.
This worked perfectly for me the last month of testing. It only started acting like this in the past week. The two transactions seems to be from Apple's side, because I can't see any way my code might be causing it. Perhaps Apple made some changes to their purchasing system and haven't worked out the kinks yet.
In my case, I was logged in with another sanbox tester account(of different developer account I mean) in Settings -> iTunes & App Store -> Sandbox Account.
I simply logged out and then tried again to perform the In-App Purchase. And so it asked me to login with another sandbox account. I did so and it worked as it should!