incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [11/17] updating repository with cordovajs
Date Sat, 28 Apr 2012 00:27:55 GMT
http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/3057bbd1/Res/js/sample.js
----------------------------------------------------------------------
diff --git a/Res/js/sample.js b/Res/js/sample.js
index e44b187..4b2a1aa 100644
--- a/Res/js/sample.js
+++ b/Res/js/sample.js
@@ -1,3 +1,16 @@
+/*
+ * Device
+ */
+
+function setDeviceInfo() {
+	var deviceInfo = document.getElementById("device");
+	deviceInfo.innerHTML = "device.name: " + device.name +
+	                   "<br />device.cordova: " + device.cordova +
+	                   "<br />device.uuid: " + device.uuid +
+	                   "<br />device.version: " + device.version +
+	                   "<br />device.platform " + device.platform
+	
+}
 
 /*
  * Acceleration
@@ -39,7 +52,7 @@ function watchAcceleration() {
 		console.log(JSON.stringify(error));
 		document.getElementById("acceleration").innerHTML = "ERROR";
 	};
-	accelWatchID = navigator.accelerometer.watchAcceleration(successCallback, errorCallback,
null);
+	accelWatchID = navigator.accelerometer.watchAcceleration(successCallback, errorCallback,
{frequency: 1000});
 	console.log("watchAcceleration "+accelWatchID);
 }
 function clearAccelerationWatch() {


Mime
View raw message