Hello,
I’ve been trying to get in app purchasing on Android up and running and I’m running into a wall with the IMarketBillingService.aidl file supplied by Google. I can’t get this file to auto generate a .java using Ant. (note: this part is solved, see Update & Update 2).
I tried using the .java file from the sample project supplied but I’m having difficulty importing it into my project to use. I got it working by changing the package name but that won’t work as it must have the package name com.android.vending.billing otherwise you get a security exception when trying to use it.
Can anyone who has implemented Android in app purchasing with Unity offer some advice?
Thanks.
UPDATE:
The problem is almost certainly in the build.xml. I’ve implemented the Openfeint plugin so my build.xml is the same as the one that came with that. I can see how the original bild.xml in the sdk mentions .aidl files so I just need to modify my own to work.
I’ve added:
<property name="android.platform.tools.dir" location="${sdk.dir}/platform-tools" />
<property name="aidl" location="${android.platform.tools.dir}/aidl.exe" />
<target name="-code-gen">
<echo>----------</echo>
<echo>Handling aidl files...</echo>
<aidl executable="${aidl}" framework="${android.aidl}"
genFolder="${gen.absolute.dir}">
<source path="${source.absolute.dir}"/>
</aidl>
</target>
But I’m not getting the error
aidl: Cant’ open preprocessed file: […]Assets/Plugins/Android/${android.aidl}