|
|
|
@ -74,6 +74,7 @@ function onRequest(context) {
|
|
|
|
|
viewModel["model"] = filteredDeviceData["initialDeviceInfo"]["DEVICE_MODEL"];
|
|
|
|
|
}
|
|
|
|
|
if (filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]) {
|
|
|
|
|
if (deviceType == "android") {
|
|
|
|
|
viewModel["BatteryLevel"] = {};
|
|
|
|
|
viewModel["BatteryLevel"]["value"] = filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["BATTERY_LEVEL"];
|
|
|
|
|
|
|
|
|
@ -100,6 +101,22 @@ function onRequest(context) {
|
|
|
|
|
} else {
|
|
|
|
|
viewModel["externalMemory"]["usage"] = 0;
|
|
|
|
|
}
|
|
|
|
|
} else if (deviceType == "ios") {
|
|
|
|
|
viewModel["BatteryLevel"] = {};
|
|
|
|
|
viewModel["BatteryLevel"]["value"] = filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["BatteryLevel"];
|
|
|
|
|
|
|
|
|
|
viewModel["internalMemory"] = {};
|
|
|
|
|
viewModel["internalMemory"]["total"] = Math.
|
|
|
|
|
round(filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["DeviceCapacity"] * 100) / 100;
|
|
|
|
|
if (filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["DeviceCapacity"] != 0) {
|
|
|
|
|
viewModel["internalMemory"]["usage"] = Math.
|
|
|
|
|
round((filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["DeviceCapacity"] -
|
|
|
|
|
filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["AvailableDeviceCapacity"])
|
|
|
|
|
/ filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["DeviceCapacity"] * 10000) / 100;
|
|
|
|
|
} else {
|
|
|
|
|
viewModel["internalMemory"]["usage"] = 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|