Monitor Device Battery Status Using Ionic Framework: "$ionicPlatform.ready(function() {
$rootScope.$on("$cordovaBatteryStatus:status", function(event, args) {
if(args.isPlugged) {
alert("Charging -> " + args.level + "%");
} else {
alert("Battery -> " + args.level + "%");
}
});
});"
'via Blog this'
No comments:
Post a Comment