Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // monitor wifi signal strength
- navigator.system.get("Network", function(connection) {
- // helper that updates the dom
- function updateStatus(conn) {
- var msg = "Wireless "+conn.essid+" at "+(conn.signalStrength*100)+"%";
- x$('#network-status').html(msg);
- }
- // only watch the wifi setting
- if (connection.type===connection.TYPE_IEEE802_11)
- navigator.system.watch("WifiConnection", updateStatus);
- }, null);
Add Comment
Please, Sign In to add comment