Getting battery level and status in galaxy s3 gear wearable web application
Getting battery level and status in galaxy s3 gear wearable web application
BY 27 Jun 2018Web Application Development
Hi,
I want to get the battery level in my galaxy s3 wearable web app. I was using the below code in tizen 2.3 application which was working fine. I updated the tizen version to 3.01 on my S3 gear recently. After the new update the below code is not working in my app.
Code
var rate = 1000;
var interval = window.setInterval(function(){
console.log("update battery info");
var battery = navigator.battery || navigator.webkitBattery || navigator.mozBattery;
var level = battery.level * 100;
},rate);
Could you please let me know if there is any other way to get the battery level and status in the new tizen(3.01) version?
Getting battery level and status in galaxy s3 gear wearable web application
Hi,
I want to get the battery level in my galaxy s3 wearable web app. I was using the below code in tizen 2.3 application which was working fine. I updated the tizen version to 3.01 on my S3 gear recently. After the new update the below code is not working in my app.
var rate = 1000;
var interval = window.setInterval(function(){
console.log("update battery info");
var battery = navigator.battery || navigator.webkitBattery || navigator.mozBattery;
var level = battery.level * 100;
},rate);
Could you please let me know if there is any other way to get the battery level and status in the new tizen(3.01) version?
BY
16 Apr 2025
Tizen Studio
BY
04 Nov 2024
Tizen Studio
BY
02 Apr 2024
Tizen Studio