First Ouya Project

EDIT:  I’ve now completed an entire app (with IAP) and submitted it for approval.  If you have any questions, please ask.  Outside of the issues with the icons, everything seems to have worked well:

http://forums.coronalabs.com/topic/41316-icon-icon-ouyapng-not-working-on-ouya/

Also, I’ve adapted the code for controllers and IAP to my style (using faked OOP), and I’ve added a virtual controller for testing on my development PC.  Would anyone be interested if I shared this on GitHub?


EDIT: I feel like an idiot.  I missed the key.der.  Don’t forget to get the key.der from the Ouya dev portal!  Put it in your main directory next to main.lua!


I’m writing this because I feel like there has to be a better way…

All I want in my game is a simple “buy the game” button.  I’ve written a wrapper that, when called, will request the available products, request the receipts, unlock the game if it has already been bought, and request the purchase if it hasn’t been bought.

Now, I’ve verified that that will all work, assuming the calls to the ouya plugin work as expected, but unfortunately, they’re not working at all as expected.  It doesn’t get past the first step (requesting products).

I’m using the code from here: https://github.com/ouya/ouya-sdk-examples/tree/master/Corona/Submission/ouya/samples/InAppPurchasesPlugin

I’ve got the same convoluted setup:

  1. local ouya = require(“plugin.ouya”)

  2. plugin_ouya = require “plugin_ouya”

3. plugin_ouya.ouyaSetDeveloperId(“5e17754e-0262-4016-bda7-841766440bac”)

  1. plugin_ouya.asyncLuaOuyaRequestProducts(callbacksRequestProducts.onSuccess, callbacksRequestProducts.onFailure, callbacksRequestProducts.onCancel, products)

I’ve added an onscreen text box to see everything as it happens.  I’ve added debug statements to every step in plugin_ouya.lua.  I’ve set it so I can request the products on a button press, so that I can do it repeatedly (as noted in other posts, there’s some funkiness where the first time just initializes it.  My actual app just does this until it is initialized, then moves on to the next step).

Now, for reasons I can’t figure out, if I alter the demo, I can get it to request the products (albeit on the second try).  However, my custom app will not.  Exacerbating the problem is the fact that I get no information whatsoever on what’s failing.  The product request never returns success, failure, or cancel (and yes, I’ve double-checked the build settings).

After having tried for several hours, I’m at a loss.

Has anyone gotten this to work?  Do you have a better system than the one in the sample code?  Do you have any tips for getting more debug info (I’d like to see the output I see when running on iOS)?

Thanks for any help you can provide!

In case people don’t read the edits:

I’ve now completed an entire app (with IAP) and submitted it for approval.  If you have any questions, please ask.  Outside of the issues with the icons, everything seems to have worked well:

http://forums.coronalabs.com/topic/41316-icon-icon-ouyapng-not-working-on-ouya/

Also, I’ve adapted the code for controllers and IAP to my style (using faked OOP), and I’ve added a virtual controller for testing on my development PC.  Would anyone be interested if I shared this on GitHub?

I would be very interested!

Congrats, tjsamson!  What’s the game’s name? I’ll make sure to grab it when it comes out. 

I’m also interested in the code, too!

Cool, I’ll clean it up and add it on Git.

Also, my game was denied, but only for two minor reasons.  I’ll let you know when it goes up.

In case people don’t read the edits:

I’ve now completed an entire app (with IAP) and submitted it for approval.  If you have any questions, please ask.  Outside of the issues with the icons, everything seems to have worked well:

http://forums.coronalabs.com/topic/41316-icon-icon-ouyapng-not-working-on-ouya/

Also, I’ve adapted the code for controllers and IAP to my style (using faked OOP), and I’ve added a virtual controller for testing on my development PC.  Would anyone be interested if I shared this on GitHub?

I would be very interested!

Congrats, tjsamson!  What’s the game’s name? I’ll make sure to grab it when it comes out. 

I’m also interested in the code, too!

Cool, I’ll clean it up and add it on Git.

Also, my game was denied, but only for two minor reasons.  I’ll let you know when it goes up.