Integrating Java Code or Android Intents

Hi all, I’m very new to Corona and lua but I like how the platform looks and how rapidly you can prototype apps.  I have Android programming experience and I have a few questions about using Corona with existing Android/Java code.  

We are using funfopen sensing framework to record data from within apps and I would like to use Corona to send out the same type of Android Broadcast Intents to the system that Java programs (using funf) are currently doing.

Questions:

  • Is it possible to send Android Broadcast Intents using Corona?  If so, can you link to an example?

  • Is it possible to integrate existing Java code with Corona?

Thanks for the help!

For your first question, google around for “Corona Android Intents” and see what forum posts come up.  I don’t know that we have anything formally documented on it, but there have been several forum posts about what varying intent support we have.

However, for your second question, Corona SDK does not have the ability to access Java or native features.  We offer another product, Corona Enterprise that does allow you to bridge Lua and Java and access a full host of native features.

Rob

Hi Rob,

Thanks for the response.  After doing some searching I’ve found http://forums.coronalabs.com/topic/39332-intents-possible-in-corona/.  It looks like I’ll need to go with the Enterprise edition to accomplish sending intents.

For future reference for other readers, I’m trying to implement something like this:

public void sendLog(String name, String value) { Intent i = new Intent(); i.setAction(DatabaseService.ACTION\_RECORD); Bundle b = new Bundle(); b.putString(NameValueDatabaseService.NAME\_KEY, name); b.putString(NameValueDatabaseService.VALUE\_KEY, value); i.putExtras(b); sendBroadcast(i); }

in Corona and there currently isn’t a native call for it.

Cheers

For your first question, google around for “Corona Android Intents” and see what forum posts come up.  I don’t know that we have anything formally documented on it, but there have been several forum posts about what varying intent support we have.

However, for your second question, Corona SDK does not have the ability to access Java or native features.  We offer another product, Corona Enterprise that does allow you to bridge Lua and Java and access a full host of native features.

Rob

Hi Rob,

Thanks for the response.  After doing some searching I’ve found http://forums.coronalabs.com/topic/39332-intents-possible-in-corona/.  It looks like I’ll need to go with the Enterprise edition to accomplish sending intents.

For future reference for other readers, I’m trying to implement something like this:

public void sendLog(String name, String value) { Intent i = new Intent(); i.setAction(DatabaseService.ACTION\_RECORD); Bundle b = new Bundle(); b.putString(NameValueDatabaseService.NAME\_KEY, name); b.putString(NameValueDatabaseService.VALUE\_KEY, value); i.putExtras(b); sendBroadcast(i); }

in Corona and there currently isn’t a native call for it.

Cheers