Wednesday 7 May 2014

How to implement FreshPlanet In App Purchase ANE in Adobe AIR

First thing I have to admit I went really crazy looking for solutions online, none of them were right.

I ended up inventing my own solution after being able to implement pozirks ANE successfully (for Android). I decided to use some stuff from here and there and I managed to make it work...

So here is the chest with the gold: here it goes what it's missing in all other pages that talk about this ANE.... The descriptor XML file configuration....


Application.XML file needs to have this lines among the rest of your items please place them in their own places:


<manifestAdditions>
<![CDATA[<manifest android:installLocation="preferExternal">
<uses-sdk android:minSdkVersion="8" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.android.vending.BILLING" />

<application android:enabled="true">
<activity android:name="com.freshplanet.inapppurchase.activities.BillingActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" android:background="#30000000" />
</application>
</manifest>]]>
</manifestAdditions>

and in extensions:
 
     
<extensionID> com.freshplanet.AirInAppPurchase </extensionID>
 


That works pretty well.
You should be able to make it work after this.... But if you have troubles , let me know and I will publish the .AS file using this ANE.






9 comments:

Unknown said...
This comment has been removed by the author.
Unknown said...

Just to take note, a slash is missing in the close tag:

Thanks for your post!

Unknown said...

Thanks! I just fixed it!

BenAdroid said...

Hello
Thanks fort your tutorial.
I need just an small example fort .as file please

Mourada

Unknown said...

Please show me the example code for using this extension, i dont' undertand.
Thank you :D

biucheung88@gmail.com said...

Hi,
Any example / sample fla for our reference? Thanks a million. :)

Unknown said...

The same 07820570S ... Any example / sample fla for our reference? Thanks 20 million. XD !!

Anonymous said...

An example FLA would be amazing please! No Idea how to implement this code.

Unknown said...

Janel i spend a lot of time and i think the ane dosent work! On the phone work fine but appstore never respond... So dont waste your time.. I think ,if this ane work properly, we have at least one working code! Maybe some fla too... I dont now... Maybe milkman buy this... So now the unique option is that :S. Maybe im wrong so if someone can makeit run on flash post a simple working file. Adios!