start adding stuff and alerts to debug GPS, PLaySOund, and Accelerometer and PhoneGap.java corrected to match my Gap.js changes

This commit is contained in:
Fred Grott
2009-01-14 14:38:35 -06:00
committed by fredgrott
parent 71600b0916
commit 4cd7985448
7 changed files with 83 additions and 13 deletions
+4
View File
@@ -196,6 +196,7 @@ var Device = {
if (Device.available || Device.whatPlatform == "Android") {
try {
document.location = "javascript:" + "window.DroidGap." + command + "()";
alert('document.location=' + document.location);
} catch(e) {
console.log("Command '" + command + "' has not been executed, because of exception: " + e);
alert("Error executing command '" + command + "'.")
@@ -213,11 +214,14 @@ var Device = {
init: function() {
Device.exec("getloc");
alert('initialized Location function and getloc was called');
},
set: function(lat, lon) {
Device.Location.lat = lat;
Device.Location.lon = lon;
alert('Device.Location let is' + lat);
alert('Device.Location lon is' + lon);
if(Device.Location.callback != null) {
Device.Location.callback(lat, lon)
Device.Location.callback = null;
+2 -2
View File
@@ -14,7 +14,7 @@
in the format of src=http://hostname:port/iBug.js
if you are not using to debug comment out
-->
<script type="application/x-javascript" src="http://%(hostName)s:%(port)s/ibug.js"></script>
<!-- <script type="application/x-javascript" src="http://192.168.1.20:1840/ibug.js"></script> -->
<script>
@@ -62,7 +62,7 @@ updateAccel = function(){
addLoadEvent(initGap);
</script>
</head><body orient="landscape">
</head><body orient="landscape">
<div class="toolbar">
<h1 id="pageTitle">Main</h1>
<a style="display: none;" id="backButton" class="button" href="#"></a>