This question is locked. New answers and comments are not allowed.
Hi,
am downloading a file from asp.net application as a stream to an icenium app using the following:
var ft = new FileTransfer();
var uri = encodeURI('http://someserver/MobileSvc/attachment?id=EBE704C0-23B1-4E3F-9E9B-214A8BBD3320&recordID=1&appointmentID=22');
ft.download(
uri,
'Document.pdf',
function(entry){
alert('download complete: ' + entry.fullPath);
},
function(error){
var msg = 'download error source ' + error.source;
msg += '\ndownload error target ' + error.target;
msg += '\nupload error code ' + error.code;
alert(msg);
},
false
)
Of course I get an error but it is error=1 or "Not_Found_Err'....so what does this error relate to and why isn't it creating the file? I can use the url in google to get the file data so that exists.
The file is not there to begin with on Android(do I need to create it first then overwrite it?)
I saw on 1 forum that it was due to android permissions (doubtful as I can create directories) but addedthe line to the manifest file anyway
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
with no change.
I loaded a pdf onto the webserver and can directly view it by entering the address. When I use that same address and try and download I get the same old error?????
am downloading a file from asp.net application as a stream to an icenium app using the following:
var ft = new FileTransfer();
var uri = encodeURI('http://someserver/MobileSvc/attachment?id=EBE704C0-23B1-4E3F-9E9B-214A8BBD3320&recordID=1&appointmentID=22');
ft.download(
uri,
'Document.pdf',
function(entry){
alert('download complete: ' + entry.fullPath);
},
function(error){
var msg = 'download error source ' + error.source;
msg += '\ndownload error target ' + error.target;
msg += '\nupload error code ' + error.code;
alert(msg);
},
false
)
Of course I get an error but it is error=1 or "Not_Found_Err'....so what does this error relate to and why isn't it creating the file? I can use the url in google to get the file data so that exists.
The file is not there to begin with on Android(do I need to create it first then overwrite it?)
I saw on 1 forum that it was due to android permissions (doubtful as I can create directories) but addedthe line to the manifest file anyway
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
with no change.
I loaded a pdf onto the webserver and can directly view it by entering the address. When I use that same address and try and download I get the same old error?????