<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to create QtObject inside a javascript file in ArcGIS AppStudio Questions</title>
    <link>https://community.esri.com/t5/arcgis-appstudio-questions/how-to-create-qtobject-inside-a-javascript-file/m-p/1038609#M3846</link>
    <description>&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;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
    }
}
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 19 Mar 2021 13:02:15 GMT</pubDate>
    <dc:creator>x_d</dc:creator>
    <dc:date>2021-03-19T13:02:15Z</dc:date>
    <item>
      <title>How to create QtObject inside a javascript file</title>
      <link>https://community.esri.com/t5/arcgis-appstudio-questions/how-to-create-qtobject-inside-a-javascript-file/m-p/1038609#M3846</link>
      <description>&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;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
    }
}
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Mar 2021 13:02:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-appstudio-questions/how-to-create-qtobject-inside-a-javascript-file/m-p/1038609#M3846</guid>
      <dc:creator>x_d</dc:creator>
      <dc:date>2021-03-19T13:02:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to create QtObject inside a javascript file</title>
      <link>https://community.esri.com/t5/arcgis-appstudio-questions/how-to-create-qtobject-inside-a-javascript-file/m-p/1040435#M3849</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/61305"&gt;@x_d&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you try changing the FileFolder section of the code?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;FileInfo {
        id: destData
        path: "~" 
    }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think it is related of this change,&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-appstudio-blog/appstudio-and-android-10-scoped-storage-changes/ba-p/896653" target="_blank"&gt;https://community.esri.com/t5/arcgis-appstudio-blog/appstudio-and-android-10-scoped-storage-changes/ba-p/896653&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Erwin&lt;/P&gt;</description>
      <pubDate>Wed, 24 Mar 2021 22:09:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-appstudio-questions/how-to-create-qtobject-inside-a-javascript-file/m-p/1040435#M3849</guid>
      <dc:creator>ErwinSoekianto</dc:creator>
      <dc:date>2021-03-24T22:09:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to create QtObject inside a javascript file</title>
      <link>https://community.esri.com/t5/arcgis-appstudio-questions/how-to-create-qtobject-inside-a-javascript-file/m-p/1040547#M3853</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/204423"&gt;@ErwinSoekianto&lt;/a&gt;&amp;nbsp; Thanks for the reply. So I gone through the documentation the scoped storage changes. and applied the path as mentioned there. But still it's not working the image gets disappeared. On appstudio player it's working fine but when i made a build for testing then it gets disappeared&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 12:19:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-appstudio-questions/how-to-create-qtobject-inside-a-javascript-file/m-p/1040547#M3853</guid>
      <dc:creator>x_d</dc:creator>
      <dc:date>2021-03-25T12:19:30Z</dc:date>
    </item>
  </channel>
</rss>

