adds download from personal server

- pulls calendar json file from (non http) server
This commit is contained in:
Raphael Maenle
2020-04-05 16:16:43 +02:00
parent 0789c5456f
commit d6732ea134
5 changed files with 197 additions and 41 deletions

View File

@ -66,7 +66,7 @@ var eventsTimeStamp = 0;
}
function getJSON() {
var downloadRequest = new tizen.DownloadRequest('http://raphael.maenle.net/calendarevents.json', 'downloads');
var downloadRequest = new tizen.DownloadRequest('http://192.168.68.103.xip.io:1234/userinfo/107971745944668140075/calendarevents.json', 'downloads');
tizen.systeminfo.getPropertyValue('NETWORK', function(networkInfo) {
if (networkInfo.networkType === 'NONE') {
console.log('Network connection is not available.Download is not possible.');
@ -76,7 +76,10 @@ var eventsTimeStamp = 0;
var listener = {
/* When the download progresses (interval is platform-dependent) */
onprogress: function(id, receivedSize, totalSize) {},
onprogress: function(id, receivedSize, totalSize) {
console.log('progress for id: ' + id);
console.log('received: ' + receivedSize + ", total: " + totalSize);
},
/* When the user pauses the download */
onpaused: function(id) {