Hi,
I'm having a lot of trouble trying to implement the latest version of ODK on my Adobe AIR game. There are some ANEs floating around, but they all seem to use the old version of the ODK (I'm not sure which version, but it's 130 kB). So I've tried both updating those to latest ODK, and finally writing my own ANE. With the old ODK, on both cases, everything works - except for purchases, presumably because of the encryption layer that was added later. Retrieving product data and controllers, for example, work fine. The exact same code, however, fails for everything with the latest ODK! I've re-read the documentation and looked through the samples many times, and I can't find anything being done wrong... my only guess is that it might be some poor interaction with Adobe AIR (for example, I don't init the facade at onCreate, because I don't have access to the activity's code).
Given that purchases are fairly critical, it's vital that I am able to get the ANE to compile against the latest ODK.
Here are some of the stack traces that I've been able to retrieve:
W/System.err(25086): java.lang.NullPointerException
W/System.err(25086): at android.os.Parcel.readException(Parcel.java:1431)
W/System.err(25086): at android.os.Parcel.readException(Parcel.java:1379)
W/System.err(25086): at tv.ouya.console.internal.IIapServiceDefinition$Stub$Proxy.requestPurchase(IIapServiceDefinition.java:178)
W/System.err(25086): at tv.ouya.console.api.OuyaFacade$RequestPurchaseRunnable.doRun(OuyaFacade.java:342)
W/System.err(25086): at tv.ouya.console.api.RequestRunnable.run(RequestRunnable.java:22)
W/System.err(25086): at tv.ouya.console.api.OuyaFacade.onServiceConnected(OuyaFacade.java:261)
W/System.err(25086): at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1097)
W/System.err(25086): at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1114)
W/System.err(25086): at android.os.Handler.handleCallback(Handler.java:615)
W/System.err(25086): at android.os.Handler.dispatchMessage(Handler.java:92)
W/System.err(25086): at android.os.Looper.loop(Looper.java:137)
W/System.err(25086): at android.app.ActivityThread.main(ActivityThread.java:4745)
W/System.err(25086): at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err(25086): at java.lang.reflect.Method.invoke(Method.java:511)
W/System.err(25086): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
W/System.err(25086): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
W/System.err(25086): at dalvik.system.NativeStart.main(Native Method)
and
W/System.err(25169): java.lang.NullPointerException
W/System.err(25169): at tv.ouya.console.api.OuyaController.getOrCreateControllerByDeviceId(OuyaController.java:494)
W/System.err(25169): at tv.ouya.console.api.OuyaController.onKeyEvent(OuyaController.java:282)
W/System.err(25169): at tv.ouya.console.api.OuyaController.onKeyDown(OuyaController.java:273)
W/System.err(25169): at com.gaslightgames.android.ouyacontrollerane.extensions.OUYAControllerANEKeyListener.onKey(OUYAControllerANEKeyListener.java:28)
W/System.err(25169): at android.view.View.dispatchKeyEvent(View.java:7081)
W/System.err(25169): at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1358)
W/System.err(25169): at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1358)
W/System.err(25169): at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1358)
W/System.err(25169): at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1358)
W/System.err(25169): at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchKeyEvent(PhoneWindow.java:1892)
W/System.err(25169): at com.android.internal.policy.impl.PhoneWindow.superDispatchKeyEvent(PhoneWindow.java:1369)
W/System.err(25169): at android.app.Activity.dispatchKeyEvent(Activity.java:2356)
W/System.err(25169): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent(PhoneWindow.java:1819)
W/System.err(25169): at android.view.ViewRootImpl.deliverKeyEventPostIme(ViewRootImpl.java:3577)
W/System.err(25169): at android.view.ViewRootImpl.handleImeFinishedEvent(ViewRootImpl.java:3547)
W/System.err(25169): at android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:2797)
W/System.err(25169): at android.os.Handler.dispatchMessage(Handler.java:99)
W/System.err(25169): at android.os.Looper.loop(Looper.java:137)
W/System.err(25169): at android.app.ActivityThread.main(ActivityThread.java:4745)
W/System.err(25169): at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err(25169): at java.lang.reflect.Method.invoke(Method.java:511)
W/System.err(25169): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
W/System.err(25169): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
W/System.err(25169): at dalvik.system.NativeStart.main(Native Method)
I'm at a complete loss, and ANY sorts of clue would be extremely helpful! Thank you!
Comments