/
Pulsar Online Status API
Pulsar Online Status API
Online Status
getOnlineStatus
var request = { "type" : "getOnlineStatus", "data" : { } // empty object- this is required in the current API }; bridge.send(request, function (results) { console.log('Javascript got its response: ' + results); if (results.type === "getOnlineStatusResponse") { var isOnline = results.data; //string value "TRUE" or "FALSE" // do something with the information } else if (results.type == 'error') { errStr = results.data; alert('A problem occurred:\n' + errStr); } });
setOnlineStatus
var request = { "type" : "setOnlineStatus", "data" : "FALSE" }; bridge.send(request, function (results) { console.log('Javascript got its response: ' + results); if (results.type === "setOnlineStatusResponse") { var isOnline = results.data; // string value "TRUE" or "FALSE" // do something with the information } else if (results.type == 'error') { errStr = results.data; alert('A problem occurred:\n' + errStr); } });
Network Status
getNetworkStatus
var request = { "type" : "getNetworkStatus" }; bridge.send(request, function (results) { console.log('Javascript got its response: ' + results); if (results.type === "getNetworkStatusResponse") { var isOnline = results.data['isConnected']; //string value "TRUE" or "FALSE" var connectType = results.data['connectionType']; //string value “Wifi”, “Cellular”, “Unknown” // do something with the information } else if (results.type == 'error') { errStr = results.data; alert('A problem occurred:\n' + errStr); } });
, multiple selections available,
Related content
Pulsar General Information API
Pulsar General Information API
More like this
Pulsar Configuration API
Pulsar Configuration API
More like this
Pulsar System Interaction API
Pulsar System Interaction API
Read with this
Native Pulsar UI Interaction API
Native Pulsar UI Interaction API
More like this
Pulsar as a Platform
Pulsar as a Platform
Read with this
Pulsar Platform - JS Bridge API
Pulsar Platform - JS Bridge API
More like this