Hi,
There are Java classes to perform some funtionality. How do we use these Java classes in Appery.IO applications. Can we import them and use them in Javascripts or we can write these classes some where inside the application?
Hi,
There are Java classes to perform some funtionality. How do we use these Java classes in Appery.IO applications. Can we import them and use them in Javascripts or we can write these classes some where inside the application?
Hello!
You can add any Java files on Source tab. If you need to call any functions from these JS files using JS code, you would need to implement them as PhoneGap plugin http://cordova.apache.org/docs/en/3.0...
I didn't get the plug-in part. I have a requirement to use below java class for receiving broadcasts. What is the best way to do that in appery.io
Thanks
public class MyReceiver extends BroadcastReceiver {
Code: Select all
@Override
public void onReceive(Context arg0, Intent arg1) {
// TODO Auto-generated method stub
Log.v("#@%@%#", "Power button is pressed.");
Toast.makeText(arg0, "power button clicked",Toast.LENGTH_LONG).show();
//perform what you want here
}}
Sorry, but we are not aware what is this requirement. You would need to check your requirements carefully and figure out where it's recommended to place the code.