A few questions about in app purchases...

I’m in the process of setting up in app purchases, it’s mostly going smoothly but I have a few things that I’m unsure about and I’m hoping someone here can help me out.

1. Test purchases.

Google Play allows you to set alpha, beta and production builds. I have ONLY uploaded an alpha build.

I have a Nexus 7, and have setup the gmail account for that (which is NOT a registered developer account) as a test user. 

My assumption was that this would mean I do not get charged for making making purchases in this app, but I don’t see any proof of that. I set one of my IAP to the lowest price I could (£0.50), and when I went through the payment process it had my card number and seemed to go through as normal. I won’t know if the payment has actually gone through until it hits my bank statement in a few days. I have used the “android.test.purchased” product and that works as it should, but I want to test my own products without having to pay for the privilege.

From what I have said above, does it sound like the purchases would be free while the app is only an alpha build? Or have I missed a step?

2. Activity Indicators.

It seems that the native.setActivityIndicator spinner is automatically set to false when the Google Play window closes. However it also takes about 5 seconds for the purchase to finalise, so in the meantime it looks like nothing is happening, and that the purchase did not give the user the item they paid for.

So I switched to the spinner widget, and made a function that either stops and hides the spinner, or starts and makes it visible. This does stay on screen, but it freezes between the Google Play window closing, and the transaction callback function being called. It then dismisses when the transaction callback function has completed, as I expect it to.

Is there any good way of handling this delay? An active spinner would be fine for me, since the user would know that means the app is ‘thinking’ or ‘loading’ or something.

Hi Alan,

On #1, I don’t believe Google Play IAP offers an equivalent of iOS’s sandbox IAP flow, where the flow is exactly like the real flow except you don’t actually make a real payment.  Instead, for Google, I believe you make a real payment, and then you’re just expected to go into your merchant account and refund the transaction to yourself.

  • Andrew

My experience with Google Play’s IAP is limited, but my test account seems to get billed for real with my real items even from a test account.

Now on the 2nd problem, whenever a Google Play dialog box shows, your app get suspended.  When the dialog finishes, your app gets resumed.  I would assume that you probably should trap for the suspend event and stop your spinner, then restart it when you get the resume event.

Hi Alan,

On #1, I don’t believe Google Play IAP offers an equivalent of iOS’s sandbox IAP flow, where the flow is exactly like the real flow except you don’t actually make a real payment.  Instead, for Google, I believe you make a real payment, and then you’re just expected to go into your merchant account and refund the transaction to yourself.

  • Andrew

My experience with Google Play’s IAP is limited, but my test account seems to get billed for real with my real items even from a test account.

Now on the 2nd problem, whenever a Google Play dialog box shows, your app get suspended.  When the dialog finishes, your app gets resumed.  I would assume that you probably should trap for the suspend event and stop your spinner, then restart it when you get the resume event.