Call native Java function

Hi guys,

My team bought corona indie license some months ago for develop one android app. Now I have the requirement to make a call ( only one in all the project) to a native Java command like getWindow().getDecorView()…

How can I do this?

Tnx in advance

Help!!! At least someone can give me some clue?

Hi @m.stortoni,

Accessing native libraries and features is only available to Corona Enterprise subscribers. 

If you’d like to explore this, please see the link below, and please contact us for more specific information.

http://www.coronalabs.com/products/enterprise/

Best regards,

Brent Sorrentino

Hi Brent,

I contacted Corona lab yesterday through site contact form after your reply to ask:

  1. how to upgrade my pro license (without buy enterprise at full price)

  2. how to integrate the call of the java native function inside my code

It’s very important for me and my team to receive reply no later than tomorrow.

Tnx

M

M - we’ve responded to your question on Corona Enterprise. Should be in your inbox.

Hi guys,

I’m back. I’m playing with Corona Enterprise trial version before to buy new license. I have configured development enviroment and I’m able to compile my project with success. Now I’m looking for a method to call “getWindow().getDecorView()…” from Java. The optimal solution should be to call it inside CoronaActivity or something similar. I’m not java or Android java expert.

It’s very important for me resolve this question

Tnx in advance everyone who will reply

Help!!! At least someone can give me some clue?

Hi @m.stortoni,

Accessing native libraries and features is only available to Corona Enterprise subscribers. 

If you’d like to explore this, please see the link below, and please contact us for more specific information.

http://www.coronalabs.com/products/enterprise/

Best regards,

Brent Sorrentino

Sorry for request, but is very urgent for me find a solution than buy corona Enterprise License.

YEAH!!!

Resolved using this code… inspired by the sample code inside CoronaEnterprise called “ExtendingUI”:

 public void onLoaded(com.ansca.corona.CoronaRuntime runtime) { com.ansca.corona.CoronaEnvironment.getCoronaActivity().runOnUiThread(new Runnable() { @Override public void run() { // \*\*\* We're now running on the main UI thread. \*\*\* // Fetch the currently running CoronaActivity. // Warning: Will return null if the activity has just been exited. com.ansca.corona.CoronaActivity activity = com.ansca.corona.CoronaEnvironment.getCoronaActivity(); if (activity == null) { return; } activity.getWindow().getDecorView().setSystemUiVisibility(8); } }); }

Hi Brent,

I contacted Corona lab yesterday through site contact form after your reply to ask:

  1. how to upgrade my pro license (without buy enterprise at full price)

  2. how to integrate the call of the java native function inside my code

It’s very important for me and my team to receive reply no later than tomorrow.

Tnx

M

M - we’ve responded to your question on Corona Enterprise. Should be in your inbox.

Hi guys,

I’m back. I’m playing with Corona Enterprise trial version before to buy new license. I have configured development enviroment and I’m able to compile my project with success. Now I’m looking for a method to call “getWindow().getDecorView()…” from Java. The optimal solution should be to call it inside CoronaActivity or something similar. I’m not java or Android java expert.

It’s very important for me resolve this question

Tnx in advance everyone who will reply

Sorry for request, but is very urgent for me find a solution than buy corona Enterprise License.

YEAH!!!

Resolved using this code… inspired by the sample code inside CoronaEnterprise called “ExtendingUI”:

 public void onLoaded(com.ansca.corona.CoronaRuntime runtime) { com.ansca.corona.CoronaEnvironment.getCoronaActivity().runOnUiThread(new Runnable() { @Override public void run() { // \*\*\* We're now running on the main UI thread. \*\*\* // Fetch the currently running CoronaActivity. // Warning: Will return null if the activity has just been exited. com.ansca.corona.CoronaActivity activity = com.ansca.corona.CoronaEnvironment.getCoronaActivity(); if (activity == null) { return; } activity.getWindow().getDecorView().setSystemUiVisibility(8); } }); }