<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html> | |
<head> | |
<title>PhoneGap Test App</title> | |
<script type="text/javascript" src="phonegap/phonegap.js"></script> | |
<script type="text/javascript" src="main.js"></script> | |
<style type="text/css"> | |
div { text-align: "center"; display: "block"} | |
</style> | |
</head> | |
<body> | |
<h2>PhoneGap Sample</h2> | |
<ul id="debuglist">Debug Output</ul> | |
<!-- Geolocation --> | |
<div> | |
<h3>Geolocation</h3> | |
<input onclick="getCurrentPosition()" type="submit" value="GeoLocation.GetLastKnownLocation"> | |
<input onclick="toggleWatchPosition(this)" type="submit" value="GeoLocation.StartWatching"> | |
<div id="geolocation" style="display:none;"> | |
altitude: 0,longitude: 0, altitude: 0 | |
</div> | |
</div> | |
<!-- Accelerometer --> | |
<div> | |
<h3>Accelerometer</h3> | |
<input onclick="getCurrentAcceleration()" type="submit" value="Accelerometer.getCurrentAcceleration"> | |
<input onclick="toggleStartAcceleration(this)" type="submit" value="Accelerometer.watchAcceleration"> | |
<div id="accelerometer" style="display:none;"> | |
x: 0, y: 0, z: 0, timestamp: 0 | |
</div> | |
</div> | |
<!-- Compass --> | |
<h3>Compass</h3> | |
<div> | |
<input onclick="getCurrentHeading()" type="submit" value="Compass.getCurrentHeading"> | |
<input onclick="toggleStartCompass(this)" type="submit" value="Compass.watchHeading"> | |
<div id="compass" style="display:none;"> | |
x: 0, y: 0, z: 0, timestamp: 0 | |
</div> | |
</div> | |
<!-- Network --> | |
<div> | |
<h3>Network</h3> | |
<input onclick="hostIsReachable('http://phonegap.com')" type="submit" value="Network.isReachable"> | |
<div id="network" style="display:none;"> | |
Network Information | |
</div> | |
</div> | |
<div> | |
<!-- Device --> | |
<div> | |
<h3>Device</h3> | |
<input onclick="getSystemInfo()" type="submit" value="Device.GetSystemInfo"> | |
<div id="system" style="display:none;"> | |
System Information | |
</div> | |
</div> | |
<!-- DebugConsole --> | |
<div> | |
<h3>DebugConsole</h3> | |
<input type="text" id="log_statement" /> | |
<input onclick="Log()" type="submit" value="console.log"> | |
</div> | |
<!-- Contact --> | |
<h3>Contact</h3> | |
<div> | |
<input onclick="createContact()" type="submit" value="Contact.create"> | |
<input onclick="saveContact()" type="submit" value="Contact.save"> | |
<input onclick="findContact()" type="submit" value="Contact.find"> | |
<input onclick="removeContacts()" type="submit" value="Contact.remove"> | |
</div> | |
<!-- Notification --> | |
<h3>Contact</h3> | |
<div> | |
<input onclick="notificationAlert()" type="submit" value="Notification.alert"> | |
<input onclick="notificationConfirm()" type="submit" value="Notification.confirm"> | |
<input onclick="notificationVibrate()" type="submit" value="Notification.vibrate"> | |
<input onclick="notificationBeep()" type="submit" value="Notification.beep"> | |
</div> | |
</body> | |
</html> |