Communication with "Host" - android application

Create issue
Issue #69 closed
Karthik T created an issue

We are integrating your port with our application in order to create small games that we can download and run OTA.. However we have need to send messages to and from the Java Layer.. Is this on the timeline? I mean something like . I was going to see if I could make a 2 way channel which could carry a table/hashmap.. but am lost as to where to start.

Comments (10)

  1. Jairo Luiz

    I can implement this... But I think this is out of the scope of this project, so, I'm not sure if this "feature" will be merged.

  2. Karthik T reporter

    Out of scope of Love2d or love2d on android? Cuz I believe on mobile this would be needed for a complete engine.. Though I guess I understand your point.. It stops being a port if it starts adding features i guess..

    I was able to get a string to go from from lua -> C -> android -> C -> lua (function arg and return). Gonna try harder things today

  3. Alex Szpakowski

    However we have need to send messages to and from the Java Layer

    What's a specific example of when/why that would be needed?

  4. Karthik T reporter

    In my case, the mini game is but a part of the application, so I imagine I will need to send back at the result of the minigame to the host system, but from prior experience I can imagine that this would be quite useful, could be used to make it easier to extend to other platforms if it is done in a extensible way, for e.g for implementing social functions in games(facebook login/like etc)

  5. Karthik T reporter

    Not sure, that sounds a bit weird to me. I am now considering using JSON to send complex objects as strings. We dont need it to send a lot of stuff over anyway, so should be ok.

  6. Log in to comment