Calling Lua functions from native android / IO

Hello,

I want to be able to call a lua function on an event happening in the android or ios side of things.

More specifically, I wrote a ble interface for a device and the app. Every time a specific state changes an android / ios function is called, BUT I want to do more complex handling of the data that is sent back, and I want to do this in lua so I don’t need to duplicate code. 

I saw some mention of CoronaCards (CoronaView) but have been unable to get that working in my project. So here are my questions:

  1. is there an easy way / best practice for calling lua functions from android or io and being able to pass some simple data?
  2. if coronaView events are really the best course of action, how can I include them in the project (which is a standard corona project) 
  3. I noticed that CoronaView requires a context but my ble service is abstracted away from it, is it possible to rectify this? 

Thanks in advance! 

Alex 

CoronaCards is for running Corona type apps in a view in a native app. Communications is basically event driven.

Corona Enterprise however may be more of what you’re looking for. It’s pretty easy to make a plugin and have your Corona SDK/Lua app access it much like any other plugin where you have API calls that you make and get data returned for it.

Rob

Ok, I am using Corona enterprise, I have a library that interacts with my ble device but I am trying to get some information back to the Corona side of things but don’t know how. 

 

I would start with the tutorials we have for Enterprise.  Google “corona enterprise tutorials”. The top 3 hits will have an iOS and an Android post and a 3rd one for SDK to Enterprise.

Those should get you started.

Rob

CoronaCards is for running Corona type apps in a view in a native app. Communications is basically event driven.

Corona Enterprise however may be more of what you’re looking for. It’s pretty easy to make a plugin and have your Corona SDK/Lua app access it much like any other plugin where you have API calls that you make and get data returned for it.

Rob

Ok, I am using Corona enterprise, I have a library that interacts with my ble device but I am trying to get some information back to the Corona side of things but don’t know how. 

 

I would start with the tutorials we have for Enterprise.  Google “corona enterprise tutorials”. The top 3 hits will have an iOS and an Android post and a 3rd one for SDK to Enterprise.

Those should get you started.

Rob