Hi, I am following the basic android plugin tutorial on AppcodingEasy and also using the AdMob plugin for reference to make a RevMob plugin. I have followed all steps including automatic building with NDK. However I am stuck when I try to build with NDK. I have copy pasted all ".h" files from Gideros installations directory and set them to build within Android.mk. Attached is a screenshot of the error I get and the zipped up file. Also attached is the zipped up eclipse project. I'd appreciate some help
Edit: I do not have great command prompt or file system knowledge but does ".." (Two dots) mean move up a directory?
Comments
https://play.google.com/store/apps/developer?id=Into-It+Games
http://appstore.com/LidiaMaximova
Likes: ar2rsawseen
https://play.google.com/store/apps/developer?id=Into-It+Games
http://appstore.com/LidiaMaximova
Edit:With some debugging found that onStop actually gets called when you press the play button, after pressing the stop button. I feel like I should experiment some more before posting questions
Likes: fxone
https://play.google.com/store/apps/developer?id=Into-It+Games
http://appstore.com/LidiaMaximova
Likes: JuanZambrano
https://play.google.com/store/apps/developer?id=Into-It+Games
http://appstore.com/LidiaMaximova
About stop button, you probably mean the button when using Gideros player?
For such purpose I usually use onPause and onResume events
https://play.google.com/store/apps/developer?id=Into-It+Games
http://appstore.com/LidiaMaximova
I saw this
Sorry if that is a very obvious question. I'm still a high school student and do not have all that much experience
https://play.google.com/store/apps/developer?id=Into-It+Games
http://appstore.com/LidiaMaximova
Edit: On second thought I see dispatch as being a separate method that does "something else" I am very very new to native development so it would be a great help if you could help me communicate from JAVA and back to Lua via events. As I said in my last post, I saw hope you can dispatch events via a proxy through the C++ class but I have no clue how to do that from a JAVA class from a "listener" method that can be called anytime depending on various uncontrollable factors such as internet speed.
https://play.google.com/store/apps/developer?id=Into-It+Games
http://appstore.com/LidiaMaximova
Yes dispatch there is something different in Notification plugin, the methods that you are looking for are prefixed as native.
The multiple cpp files are to separate lua binding and Java/JNI stuff, so lua binding can be reused with other platforms, like IOS
So lets take a look at GoogleBilling plugin and start from the start.
in ggooglebilling.cpp, when creating GGoogleBilling instance, we are calling static method init of Java class and what we pass there is the pointer to our current GGoogleBilling instance like this:
So later in java code, when the specific event is received, this native method is called.
Then on the C part, we receive this call like this:
Inside this method we enqueue the event to Gideros:
gevent_CreateEventStruct1 for single string
gevent_CreateEventStruct2 for two strings
gevent_CreateEventStruct3 for three strings
After that we simply enqueue event by calling:
GGOOGLEBILLING_CHECK_BILLING_SUPPORTED_COMPLETE_EVENT is an id of event, thats why we have them enumed in ggooglebilling.h
event is the event data/structure we created earlier
Number 1 tells to Gideros event system that free() function should be called on event pointer after dispatching it.
And the last argument this, is basically an additional data to pass to event callback (similar like it is in Lua Gideros part) so we can cast instance from static callback method.
Last things to do is to handle that on Lua part, thus inside googlebillingbinder.cpp where all the binding is done, there is a dispatchEvent(int type, void *event) method, which basically creates Event object in lua, adds the provided information from event structure and dispatches it.
The one question that might remain is how come, if we enqueue event in ggooglebilling.cpp we receive something inside googlebillingbinder.cpp?
Because inside googlebillingbinder.cpp in constructor of GoogleBilling we called
I know it's a lot to take in, so sure start slowly and you can ask any questions
Likes: fxone
Likes: fxone
http://www.nightspade.com
https://play.google.com/store/apps/developer?id=Into-It+Games
http://appstore.com/LidiaMaximova