image display issue

415
1
Jump to solution
01-19-2021 04:32 AM
rsharma
Occasional Contributor III

hi 

 

i have tried several ways, to display images , sometime it workon ios but do not work on window, sometime it work on window pc and do not work on android and mac, i am a bit confused, what kind of path does correctly display on all devices.

like it takes below path sometimes on window but do not work on mac, and same path do not work on android and ios :=>

file:///C:/Users/trupt/ArcGIS/AppStudio/Apps/HuntingHQFinal/cameraPictures/74455ff568124d9c98c8fac92...

like i am trying like this:

                property string app_root_path: Qt.resolvedUrl(".");
    var newObj = Qt.createQmlObject("import QtQuick 2.12;import ArcGIS.AppFramework 1.0; NetworkRequest{id:networkRequest}", root, "");
 newObj.url = dev_href;
var dev_href_fname=dev_href.split('/').pop();
    var newurl = settings.app_root_path.replace("file:///", "/");
    newObj.responsePath = newurl+"assets/media_images/"+dev_href_fname;

using this response path to download and show image on image object

 

0 Kudos
1 Solution

Accepted Solutions
ErwinSoekianto
Esri Regular Contributor
0 Kudos
1 Reply
ErwinSoekianto
Esri Regular Contributor

@rsharma 

 

I think with this fix on this post,  https://community.esri.com/t5/arcgis-appstudio-questions/getting-path-for-image-for-both-ios-and-and... , it should also fix this issue.

 

Erwin

0 Kudos