diff --git a/.classpath b/.classpath index ae50e9d9..9f892e85 100644 --- a/.classpath +++ b/.classpath @@ -1,6 +1,6 @@ - + diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 57a440a4..4aac3e48 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -12,6 +12,7 @@ + diff --git a/assets/gap.js b/assets/gap.js index b81f3dc5..30236518 100644 --- a/assets/gap.js +++ b/assets/gap.js @@ -4,7 +4,7 @@ * website: http://phonegap.com * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the - * “Software”), to deal in the Software without restriction, including + * Software), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to @@ -13,7 +13,7 @@ * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * - * THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, + * THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE @@ -284,16 +284,29 @@ var Device = { return Device.exec("vibrate") }, - playSound: function(clip) { - xsound = "sound:"; - if (Device.whatPlatform == "Android") { - xsound = "playSound"; - return Device.exec(xsound + clip); - } - - return Device.exec(xsound + clip); + playSound: function(clip) { + xsound = "sound:"; + if (Device.whatPlatform == "Android") { + xsound = "playSound"; + return Device.exec(xsound + clip); + } + return Device.exec(xsound + clip); + }, + + notification: { + watchPosition: function(filter) { + window.DroidGap.notificationWatchPosition(filter); + }, + clearWatch: function(filter) { + window.DroidGap.notificationClearWatch(filter); + } + }, + + http: { + get: function(url, file) { + window.DroidGap.httpGet(url, file); } - + } } function gotLocation(lat, lon) { @@ -301,3 +314,4 @@ function gotLocation(lat, lon) { return Device.Location.set(lat, lon) } + diff --git a/assets/index.html b/assets/index.html index de87a53e..d069a134 100644 --- a/assets/index.html +++ b/assets/index.html @@ -86,6 +86,31 @@ updateAccel = function(){ } +receiveSmsNotification = function(func) +{ + if (func == 'watchPosition') { + Device.notification.watchPosition('SMS'); + } else + if (func == 'clearWatch') { + Device.notification.clearWatch('SMS'); + } +} + +function onReceiveSms(number, message) +{ + $('number').value = number; + $('message').value = message; +} + +http = function(func) +{ + if (func == 'get') { + Device.http.get($('httpGetUrl').value, $('httpGetFile').value) + } +} + + + addLoadEvent(initGap); @@ -105,6 +130,8 @@ addLoadEvent(initGap); Vibration Play Sound Photo... + Notification... + HTTP... About @@ -218,6 +245,48 @@ addLoadEvent(initGap); + + Notification + + + startSmsListener + stopSmsListener + + + + + from: + + + + + + message: + + + + + + HTTP + Make sure your Android sdk sdcard is mounted! + + + HTTP get remote_url + + + + + remote_url: + + + + + + destination: + + + + -
Make sure your Android sdk sdcard is mounted!