To Integrate third party
.aar files with
Appzillon, we need to
import the
.aar file at following place :
app >> OS Preferences >> Android >> Extension >> Archive Library
Open file
Main present at the following location
appzillon app >> OS Preferences >> Android >>Extension
Import all necessary files in import section
eg :
Inside function
nativeServiceEntry add code to launch the activity
eg :
Code: Select all
public static JSONObject nativeServiceEntry(WebView wv, Activity act, JSONObject jsonText) {
String action = "";
try {
action = jsonText.getString("action");
if ("launch".equalsIgnoreCase(action)) {
APZEid.init(act, wv, jsonText);
act.startActivity(new Intent(act,APZEid.class));
}
} catch (JSONException exp) {
}
return null;
}
Here we are importing a third party .aar file, which contains an Android Activity named as APZEid, which needs to be launched, when the action of passed json is launch.
JavaScript Code to call this extended plugin :
Code: Select all
var json = {};
json.id = "NATIVE";
json.action = "audio";
json.callBack = apz.login.nativeExtCallback;
apz.ns.nativeServiceExt(json);