IAP Headaches.

Monkey Targets Forums/Android/IAP Headaches.

caffeinekid(Posted 2013) [#1]
I've got IAP working on OUYA previously with two games but trying to do a vanilla Android games with it now and it doesn't seem to want to play. Are there any big differences in the code I have to make? It looks like it's not even getting hold of the store for some reason.

E/Volley (22361): [2759] BasicNetwork.performRequest: Unexpected response code 500 for https://android.clients.google.com/fdfe/bulkDetails
I/[Monkey](26825): OpenStoreComplete, result=-1
E/AndroidRuntime(26825): FATAL EXCEPTION: main

E/AndroidRuntime(13901): FATAL EXCEPTION: main
E/AndroidRuntime(13901): Process: com.tcksoft.stoplightpuzzle, PID: 13901
E/AndroidRuntime(13901): java.lang.RuntimeException: Store unavailable

It's probably a rookie error and someone will make me look silly for overlooking something.

I'm including all the stuff I think you need:-

Import mojo
Import brl.json
Import brl.filestream
Import brl.monkeystore

I've copied all the needed methods from the iaptest banana.

Thanks in advance.

I know that OUYA needs a keyfile to reach the store correctly, but Android doesn't?


caffeinekid(Posted 2013) [#2]
Anyone? I have an almost finished game here but can't even test it now because I've broken it by adding the store etc.

I have all the various sdks installed - ant, android, etc.

It just seems to be dying at the opening of the store.

I've uploaded the apk to google play, as recommended too.

I'm lost...


Xaron(Posted 2013) [#3]
Hmm... maybe that's too obvious but the Manifest has at least these lines?

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.android.vending.BILLING" />


caffeinekid(Posted 2013) [#4]
Cheers for the reply I thought I was just yelling at myself. lol.

The manifest seems fine - to my knowledge. It has the right permissions - as they are automatically added(?) by Monkey when you import the code to your project for IAP/billing. I've used it for OUYA without problems but Google Play/vanilla Android is not playing ball and just crashing out when it tries to access the store.

The game runs for a second or two but then just goes boom. :(


Xaron(Posted 2013) [#5]
Ah well it goes boom? In that case could you just post the log please?

Edit: Uh dear you did... sorry. Let's see...


Xaron(Posted 2013) [#6]
Have you setup your google account as a test account?

http://developer.android.com/google/play/billing/billing_admin.html#billing-testing-setup

Edit: Oh and it MAY NOT be the same account as your merchant account as you can't buy stuff from yourself (unfortunately)


caffeinekid(Posted 2013) [#7]
Does IAP on Android need licensing too to work?

I've read that link and it just goes on about license keys etc.

As far as I'm aware Monkey doesn't support Google Play licensing - is that the problem?

I tried putting my tablet in airplane mode out of interest to see if it ran and it still crashes on trying to open the store even though you would think it would realise there was no connection and just continue without being able to access the store.


caffeinekid(Posted 2013) [#8]
Surely there must be someone here who has used IAP in Google Play and can offer advice, or who has come across this problem? :/


erebel55(Posted 2014) [#9]
caffeinekid did you ever figure out what was wrong??

I had iap working just fine on android and purchased several test items and then all of a sudden it stopped working and I am getting the same error you were.


caffeinekid(Posted 2014) [#10]
I gave it up as a bad job :(