Is it possible to run Gideros App as a android activity ? I need to create a suite of games where some are lua and some are native android. I am looking at pure android solution as of now..
Hmm.. Well i wanted a regular android activity launch the guiders mobile app as a short game. Your solution essentially does the opposite.
But i did look again at the android code generated and it does create a nice simple activity which makes it easily launch able from any other android activity within the same application.
Getting adventurous ! - Is it possible to pass any kind of parameters to the init.lua from the android app ?
Well to pass data to lua there are 3 options 1) using the jvbridge 2) using native bridge in the Labs (for upgraded members) (will need to do some wrapping though) 3) use events and pass data as with regular plugin (can be complicated to understand): http://giderosmobile.com/forum/discussion/comment/23799#Comment_23799
Well, I understand the plugin as one path to pass data to lua. What i want to understand is that can i pass it at startup to change the startup behaviour.
if user A is starting app start with user A's favourite song or if it is user B start with their favourite song..
The determination of User A or B is made by my parent android app which launches this child activity.
Aha I see, well nothing like this natively But usually all game initiation is done in main.lua so if you simply cover that intiation (of scenemanager, etc) in some sort of function, then when activity starts, your app won't start, but you can then start it by calling the wrapped function and passing any parameters you want there.
Thats theoretically, I have not tried that, but I think it could work
Comments
Here it is:
http://giderosmobile.com/forum/discussion/2871/gideros-and-android-demo-how-to-switch-activity-from-lua-to-native-and-vice-versa/p1
But i did look again at the android code generated and it does create a nice simple activity which makes it easily launch able from any other android activity within the same application.
Getting adventurous ! - Is it possible to pass any kind of parameters to the init.lua from the android app ?
1) using the jvbridge
2) using native bridge in the Labs (for upgraded members) (will need to do some wrapping though)
3) use events and pass data as with regular plugin (can be complicated to understand):
http://giderosmobile.com/forum/discussion/comment/23799#Comment_23799
but might be easier from numerous plugin examples
if user A is starting app start with user A's favourite song or if it is user B start with their favourite song..
The determination of User A or B is made by my parent android app which launches this child activity.
-UncleKing
But usually all game initiation is done in main.lua
so if you simply cover that intiation (of scenemanager, etc) in some sort of function, then when activity starts, your app won't start, but you can then start it by calling the wrapped function and passing any parameters you want there.
Thats theoretically, I have not tried that, but I think it could work