I need to get device battery Level. How do I get device battery level?

Hey, do you know how to get device batery level?
I tried through JS but no sucess.
Thanks!