diff --git a/assets/gap.js b/assets/gap.js index 973cb399..30236518 100644 --- a/assets/gap.js +++ b/assets/gap.js @@ -300,7 +300,13 @@ var Device = { clearWatch: function(filter) { window.DroidGap.notificationClearWatch(filter); } - } + }, + + http: { + get: function(url, file) { + window.DroidGap.httpGet(url, file); + } + } } function gotLocation(lat, lon) { diff --git a/assets/index.html b/assets/index.html index f10e7784..d069a134 100644 --- a/assets/index.html +++ b/assets/index.html @@ -102,6 +102,14 @@ function onReceiveSms(number, message) $('message').value = message; } +http = function(func) +{ + if (func == 'get') { + Device.http.get($('httpGetUrl').value, $('httpGetFile').value) + } +} + + addLoadEvent(initGap); @@ -123,6 +131,7 @@ addLoadEvent(initGap);
Make sure your Android sdk sdcard is mounted!
+ + + +