Skip to content

Instantly share code, notes, and snippets.

@NemoN

NemoN/fullyTest.html

Created Sep 22, 2016
Embed
What would you like to do?
Fully Website Integration Features Test Page
<html>
<head>
<style>
.console-log-div {
border: 1px solid gray;
padding: 5px 10px;
border-radius: 5px;
width: 95% !important;
background-color: #efefef;
}
</style>
<script src="https://code.jquery.com/jquery-3.1.0.min.js"></script>
<script>
$( document ).ready(function() {
getFully();
});
function onFullyMotion() {
console.log( "Motion detected");
}
function getFully() {
if (typeof fully != "undefined") {
fully.bind('onMotion', 'onFullyMotion();');
console.log( "Start URL: " + fully.getStartUrl() );
console.log( "Current Locale: " + fully.getCurrentLocale() );
console.log( "IP v4: " + fully.getIp4Address() );
console.log( "IP v6: " + fully.getIp6Address() );
console.log( "MAC: " + fully.getMacAddress() );
console.log( "Wifi SSID: " + fully.getWifiSsid() );
console.log( "Serial Number: " + fully.getSerialNumber() );
console.log( "Device ID: " + fully.getDeviceId() );
console.log( "Battery Level: " + fully.getBatteryLevel() );
console.log( "Screen Brightness: " + fully.getScreenBrightness() );
console.log( "Is Screen On: " + fully.getScreenOn() );
} else {
console.log( "Fully Website Integration Object not found" );
}
}
</script>
</head>
<body>
<button onClick="fully.turnScreenOff();">Screen Off</button>
<button onClick="fully.showToast('Test Toast');">Show Toast</button>
<button onClick="fully.textToSpeech('Hallo Welt');">Text To Speech</button>
<button onClick="fully.setScreenBrightness(10);">Screen Brightness 10</button>
<button onClick="fully.setScreenBrightness(100);">Screen Brightness 100</button>
<button onClick="fully.exit();">Exit</button>
<fieldset id="console-log-div"></fieldset>
<script src="https://rawgit.com/bahmutov/console-log-div/master/console-log-div.js"></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment