I downloaded an MFP 6.3 sample project from below URL and migrated to MFP 8.0
function wlCommonInit(){
document.addEventListener(WL.Events.WORKLIGHT_IS_CONNECTED, connectDetected, false);
document.addEventListener(WL.Events.WORKLIGHT_IS_DISCONNECTED, disconnectDetected , false);
}
function connectionFailure(){
alert("Could not connect to the MobileFirst Server.");
var output = new Date() + "<hr />Working offline";
$('#info').html(output);
}
function disconnectDetected(){
var output = new Date() + "<hr />disconnectDetected";
$('#info').html(output);
}
function connectDetected(){
var output = new Date() + "<hr />connectDetected";
$('#info').html(output);
}
function setHeartBeatInterval(interval){
var output = new Date() + "<hr />heartbeat interval is set to: " + interval;
$('#info').html(output);
WL.Client.setHeartBeatInterval(interval);
}
WL.Client.setHeartBeatInterval
function is called. But WORKLIGHT_IS_CONNECTED, WORKLIGHT_IS_DISCONNECTED
events not triggered in MFP 8.0.
Will WL.Client.setHeartBeatInterval
is work or not?