Methods
(static) this.clearCache()
Clears the given cache, removing all URL response objects that it stores.
- Source:
(static) this.get(settingsRead)
Requests QBrowser settings be sent to the provided callback function
Parameters:
| Name | Type | Description |
|---|---|---|
settingsRead |
function | Callback function that receives settings. Parameters: - settings(array) - Array of settings |
- Source:
Example
// Example callback function to display all settings
function SettingsReceived(settings) {
document.body.innerHTML += "<b>QBrowser settings:</b><br/>";
for (var i in settings) {
document.body.innerHTML += "<b>" + i + ": </b>" + settings[i].toString() + "<br/>";
}
}
(static) this.getBatteryLevel(batteryLevelFunction, errorBatteryLevelFunction)
Gets IPC device battery level
Parameters:
| Name | Type | Description |
|---|---|---|
batteryLevelFunction |
function | Callback function that receives battery level. Parameters: - batteryLevel(string) - Battery level in format "capacity - voltage" |
errorBatteryLevelFunction |
function | Error callback function. Parameters: - errorMessage(string) - Textual description of the error |
- Source:
(static) this.locationEnabled(isEnabled)
Allows location tracking request. Default is False.
Parameters:
| Name | Type | Description |
|---|---|---|
isEnabled |
boolean | Location tracking enabled or disabled |
- Source:
(static) this.sendLog()
Sends debug log
- Source:
(static) this.set(settings)
Sets QBrowser settings
Parameters:
| Name | Type | Description |
|---|---|---|
settings |
Object | Object containing desired QBrowser settings. You can set one or multiple settings with a single call. |
- Source:
Example
// Example function to change some settings
QBrowser.Settings.set({showNavigation:true, barcodeFunction:"BarcodeReceived"});
(static) this.setOrientation(anOrientation)
Sets iOS screen orientation
Parameters:
| Name | Type | Description |
|---|---|---|
anOrientation |
number | Desired orientation. Use constant from QBrowser.OrientationMasks. |
- Source: