Hi, there so i tried this example to download a image from server and save it to the local. This Works fine on laptop. But test the same thing on my phone it doesn't save the photo to the path I given. What to do? can anybody please help.
Page{
id: app
FileFolder {
id: fileFolder
url: "assets/media_images"
}
//Downloads an image from the web
NetworkRequest {
id: networkRequest
url: "http://appstudio.arcgis.com/images/index/introview.jpg"
responsePath: fileFolder.path +"/appstudio.jpg"
property url imagePath: responsePath
onReadyStateChanged: {
if (readyState == NetworkRequest.DONE) {
image.source = "assets/media_images"+"/appstudio.jpg";
}
}
onError: {
console.log(errorText + ", " + errorCode)
//On failure, don't use the local copy
image.source = ""
}
}
ColumnLayout {
spacing: 20
Button {
id:download
text: "Download Request (Download Image)"
Layout.margins: 2
Layout.fillWidth: true
onClicked: {
networkRequest.send({f:"json"});
}
}
Image {
id: image
Layout.margins: 10
Layout.preferredWidth: 250
Layout.preferredHeight: 200
}
}
}