An example plug-in class that allows access to the iOS network activity monitor is available in WorkFlow/Classes/Plugins.
var gActIndicator = true; // global variable
function customAfterMenuItemClick(screen, menuItem) {
if (screen === "Start" && menuItem === "networkActivityIndicator") {
window.plugins.networkActivityIndicator.set( gActIndicator, aiSuccess, aiFail );
// Toggle the network activity indicator each time plugin is selected
if ( gActIndicator )
gActIndicator = false;
else
gActIndicator = true;
return false;
}
}
function aiSuccess() {
alert("Successfully enabled activity indicator");
}
function aiFail() {
alert("Failed to enable activity indicator");
}
Key: networkActivityIndicator Type: String Value: networkActivityIndicator