--- a/usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js +++ b/usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js @@ -2255,6 +2255,16 @@ var batteryalert = $L("#{percent_ui}% battery remaining").interpolate(payload); if(this.batteryLevel <= 5 && !this.batteryLevel5Shown) { this.batteryLevel5Shown = true; + //Report battery level to ST-Watch MBW150 + var request = new Mojo.Service.Request('palm://com.palm.applicationManager', { + method: 'open', + parameters: { + id: "de.metaviewsoft.mwatch", + params: {command: "SMS", icon: "000007800ff0081008100810081008100810081008D00BD00BD008100FF00000", appid: "luna.battery.alert", info: batteryalert} + }, + onSuccess: function() {}, + onFailure: function() {} + }); this.showLowBatteryAlert(); } else if(this.batteryLevel > 5 && this.batteryLevel <= 10 && !this.batteryLevel10Shown) { @@ -2265,6 +2275,16 @@ icon: "/usr/lib/luna/system/luna-systemui/images/battery-"+i+'.png', soundClass: "notifications" },{}, 'batteryAlert'); + //Report battery level to ST-Watch MBW150 + var request = new Mojo.Service.Request('palm://com.palm.applicationManager', { + method: 'open', + parameters: { + id: "de.metaviewsoft.mwatch", + params: {command: "SMS", icon: "000007800ff0081008100810081008100810081008D00BD00BD008100FF00000", appid: "luna.battery.alert", info: batteryalert} + }, + onSuccess: function() {}, + onFailure: function() {} + }); } else if(this.batteryLevel > 10 && this.batteryLevel <= 20 && !this.batteryLevel20Shown) { Mojo.Log.info("SystemUI- show 20% warning - Battery level "+ i); @@ -2274,6 +2294,16 @@ icon: "/usr/lib/luna/system/luna-systemui/images/battery-"+i+'.png', soundClass: "notifications" },{}, 'batteryAlert'); + //Report battery level to ST-Watch MBW150 + var request = new Mojo.Service.Request('palm://com.palm.applicationManager', { + method: 'open', + parameters: { + id: "de.metaviewsoft.mwatch", + params: {command: "SMS", icon: "000007800ff0081008100810081008100810081008D00BD00BD008100FF00000", appid: "luna.battery.alert", info: batteryalert} + }, + onSuccess: function() {}, + onFailure: function() {} + }); } if (this.batteryLevel < this.minBatThresholdForUpdate) {