Getting battery level and status in galaxy s3 gear wearable web application


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;

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?

Edited by: Sainath Morpoju on 26 Jun, 2018


3 Replies
Marco Buettner

use navigator.getBattery();

Marco Buettner

Armaan-Ul- Islam

navigator.battery is deprecated, You have to use navigator.getBattery instead according to Tizen Web Debugger Tool:

As Marco Buettner mentioned.

This is common code for web tool, But the best solution for Tizen Wearable is to use Tizen Wearable Web: SystemInfo API to fetch System Information.

function onSuccessCallback (BatteryInfo) {
    var isCharging = BatteryInfo.isCharging;
    var gearBatteryLevel = (BatteryInfo.level * 100);



For Further Documentations:

SystemInfo Web API References