Hey everyone so before I publish my game I really want to Implement this ANE for item purchasing. I looked over all the docs and ReadME but still am confused on how to even get a screen to pop up on showing the purchase or anything.
Here is a link to the ANE I am using: https://github.com/pozirk/AndroidInAppPurchase
Here is how I have it setup in my appXML:
I added the ANE and SWC inside Flash CS6 correctly.
Inside my main class this is what i am trying to do in order to initialize:
//In app Purchases variable
private var _iap:InAppPurchase = new InAppPurchase();
In my Button Mouse event handler:
private function inAppPurchaseGameHandler(e:MouseEvent):void
{
_iap.addEventListener(InAppPurchaseEvent.INIT_SUCCESS, onInitSuccess);
_iap.addEventListener(InAppPurchaseEvent.INIT_ERROR, onInitError);
_iap.addEventListener(InAppPurchaseEvent.PURCHASE_SUCCESS, onPurchaseSuccess);
_iap.addEventListener(InAppPurchaseEvent.PURCHASE_ALREADY_OWNED, onPurchaseSuccess);
_iap.addEventListener(InAppPurchaseEvent.PURCHASE_ERROR, onPurchaseError);
_iap.addEventListener(InAppPurchaseEvent.CONSUME_SUCCESS, onConsumeSuccess);
_iap.addEventListener(InAppPurchaseEvent.CONSUME_ERROR, onConsumeError);
_iap.addEventListener(InAppPurchaseEvent.RESTORE_SUCCESS, onRestoreSuccess);
_iap.addEventListener(InAppPurchaseEvent.RESTORE_ERROR, onRestoreError);
//> initialization of InAppPurchase
_iap.addEventListener(InAppPurchaseEvent.INIT_SUCCESS, onInitSuccess);
_iap.addEventListener(InAppPurchaseEvent.INIT_ERROR, onInitError);
_iap.init("MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3sOnbk76yCNbtqRN5Vgm3oaDNRiitXGcyQ0svyXjA+qIOCZT4qAauOonuGXPHy8jgtHyfYIKmnyOX+3EFdyv0SGz/MtSWg1aSFEnS6+X61Uk5a0MCWGcnsHR3l3giITiU3PWlAAKICehCxy3g4N+I5r4FXdEacOwNj7PC4EdyEA4bmb1Y8bChsDYsdC1ZrKs93GRVJh2s6tHHzP3tqVF/wt+5cJ7aag11+7I3CTaDrlw2A8d8sfZVYAGyibSadZiOOVhKKxidD95MySfJOFc8Izng0kISJf7/PRpFKRHD4Yx9AmplzJe2OiB7UyGLzZGc8mmoaO+H7zylHt34a3g6QIDAQAB");
}
I have all the functions Blank at the moment because I am not sure what to add to them in order for this to work properly.
Can anyone point me in the correct direction please? Do you see anything wrong in my XML or code? Thank you!