+ 1

Please how do I get the current battery level of a phone

JavaScript navigator.battery

11th Sep 2020, 1:09 AM
K_9ne
K_9ne - avatar
2 Respuestas
11th Sep 2020, 1:12 AM
Divya Mohan
Divya Mohan - avatar
0
navigator.getBattery().then((battery)=>{ console.log(battery.level*100); })
11th Sep 2020, 1:16 AM
Divya Mohan
Divya Mohan - avatar