IAP - stop SRC folder deletion?

Monkey Targets Forums/Android/IAP - stop SRC folder deletion?

pantson(Posted 2013) [#1]
Hi
Already hit a hurdle for IAP in Android :-(
How do I stop Monkey deleting the src folder as its required for the Android billing library?

http://developer.android.com/google/play/billing/billing_integrate.html

Copy the IInAppBillingService.aidl file to your Android project.
If you are using Eclipse: Import the IInAppBillingService.aidl file into your /src directory. Eclipse automatically generates the interface file when you build your project.
If you are developing in a non-Eclipse environment: Create the following directory /src/com/android/vending/billing and copy the IInAppBillingService.aidl file into this directory. Put the AIDL file into your project and use the Ant tool to build your project so that the IInAppBillingService.java file gets generated.
Build your application. You should see a generated file named IInAppBillingService.java in the /gen directory of your project.

I'm currently running v67+, If this makes a difference
many thanks


maverick69(Posted 2013) [#2]
You can patch trans (android.monkey) to handle this for you. (check this post: http://www.monkeycoder.co.nz/Community/posts.php?topic=3691#48087 )

I can also recommend the use for such purposes of this neat monkey-wizard:

https://github.com/michaelcontento/monkey-wizard

I don't use it in productive environment yet, but I just played around with it and it is awesome (also for other tasks).


pantson(Posted 2013) [#3]
many thanks for this....
I like the look of that wizard. gonna save a lot of time ta!


pantson(Posted 2013) [#4]
Ta

in v67e I've changed the code from
		If GetCfgVar( "ANDROID_NATIVE_GL_ENABLED" )="1"
			CopyDir "nativegl/libs","libs",True
			CreateDir "src/com"
			CreateDir "src/com/monkey"
			CopyFile "nativegl/NativeGL.java","src/com/monkey/NativeGL.java"
		Endif

to
		If GetCfgVar( "IN_APP_BILLING" )="1"
		    Print "Copy in app billing..."
		    DeleteDir "src/com/android", True
		    DeleteDir "src/com/payment", True
		    CopyDir "inappbilling", "src/com/", True
		End

		If GetCfgVar( "ANDROID_NATIVE_GL_ENABLED" )="1"
			CopyDir "nativegl/libs","libs",True
			CreateDir "src/com"
			CreateDir "src/com/monkey"
			CopyFile "nativegl/NativeGL.java","src/com/monkey/NativeGL.java"
		Endif

recompiled using minGW32 (replaced transcc_winnt.exe) and now get an error
Semanting...
D:/dev/bin/MonkeyPro67e/src/transcc/transcc.monkey<15> : Error : Identifier 'AppArgs' not found.
Done.

@
Function Main()
	Local tcc:=New TransCC
	tcc.Run AppArgs
End

any ideas please?


pantson(Posted 2013) [#5]
hahahahahahaha

helps if I don't compile transcc into Android and compile my program instead ;-)

All sorted


pantson(Posted 2013) [#6]
looks like theres some work to be done on the bono module for v67e
Just going through it..
It looks like I also need robomedia classes as well. Would this be right?


michaelcontento(Posted 2013) [#7]
Yes, PaymentProviderAndroidGoogle is based on this billing library. But messing around inside of trans isn't that cool so I've created Monkey-Wizard. Just give it a try! In this case it should be simple as

./wizard.build/stdcpp/main_macos GooglePayment ../path-to-your-project/projectname.build/android

:)


michaelcontento(Posted 2013) [#8]
I've also added some docs to the source of PaymentProviderAndroidGoogle.


Origaming(Posted 2013) [#9]
hi,

i'm currently testing iap using Playphone SDK and on windows right click Android billing library - properties - readonly,


Xaron(Posted 2013) [#10]
Hey pantson, how far have you come with your IAP module for Android?