|
POST
|
I think this does what I want... "Feature Table" App "FeatureTableManualCache" Testing
... View more
06-05-2019
10:47 AM
|
0
|
1
|
844
|
|
POST
|
I was looking at the App Studio template for "Feature Layer (Geodatabase)" https://github.com/Esri/arcgis-appstudio-samples/tree/v3.3/Feature%20Layer%20(Geodatabase) Confused by the geodatabase that they are saving. That's not a Personal or File gdb. What is it... Secondly this solution requires the Geodatabase to be on the phone....looking for something more along the sync side of things...or a download of a feature service....any ideas
... View more
06-05-2019
10:19 AM
|
0
|
2
|
844
|
|
POST
|
I have an app that I am testing out. I have an mmpk file that I store on the SD card. I open this when the map opens... I then have a Feature Service that is published to a Feature Service. I want to place a button on the map that downloads the Feature Service for Offline access. Each time the button is clicked a new version is copied down. This has to be fully offline. I thought of an mmpk file but the data changes often so I need to grab something new every time. Maybe a webmap? But I only want the feature data and not the base map. Any ideas?
... View more
06-04-2019
07:59 AM
|
0
|
3
|
945
|
|
POST
|
OK last one before we go offline....I was able to download and install AppStudio Player on my phone run the app successfully....This is what I got... path: "/data/user/0/com.esri.appstudio.player/cache/DGIFVirginia_E3App.apk" url: "file:///data/user/0/com.esri.appstudio.player/cache/DGIFVirginia_E3App.apk" Cant find the folder above "com.esri.appstudio.player" ============================================== I tried the below but no luck....nothing downloaded Top of mmpkManager.qml readonly property url storageBasePath: "/data/user/0/ArcGIS/AppStudio/Data/Test" Bottom of mmpkManager.qml var fileslocation = "/data/user/0/ArcGIS/AppStudio/Data/Test/QuickReport"
var path = [fileslocation, "~"+itemName].join("/"); Trying to write here
... View more
05-21-2019
12:22 PM
|
0
|
0
|
569
|
|
POST
|
If I run this on my desktop in AppStudio Player and then navigate to my phone that is connected to the computer I get this But this is referencing my C drive which is not on the phone
... View more
05-21-2019
11:24 AM
|
0
|
2
|
569
|
|
POST
|
where do I access the Console.log on my phone? Maybe I am not following sorry
... View more
05-21-2019
09:18 AM
|
0
|
4
|
1444
|
|
POST
|
OK going to have to look at this a bit...I ran the code and saw the button in the top left hand corner. I clicked it and a new page appeared that allowed me to navigate to the SD card. I then went into the DCIM folder and clicked on a jpg image. The screen moved to the side and was left with nothing but a Black screen.....tried this a few times with the same result...I will dive into the code a bit to see if I can modify something. It works fine when I run it through AppStudio on my desktop but black screen appears on the phone... Update: I tried to make the text green to see if that would show up on the black background that I am seeing on the phone.... Not working... Text { id: fileProperties anchors.centerIn: parent text: "Default" font.pointSize: 12 color: "Green" }
... View more
05-21-2019
04:56 AM
|
0
|
6
|
1444
|
|
POST
|
I changed my code for a few examples and can write to the Internal Storage like this: The BELOW examples allow me to write to the internal storage.... BUT I still CANNOT write to the storage card.....uggggggg Although.....the below shows that the code is working I just cannot get the SC Card Path correct. Top of the mmpkmanager.qml readonly property url storageBasePath: "file:///storage/emulated/0/ArcGIS/AppStudio/Data"
// OR
readonly property url storageBasePath: "file:///storage/self/primary/ArcGIS/AppStudio/Data" Bottom of the mmpkManager.qml var fileslocation = "/storage/emulated/0/ArcGIS/AppStudio/Data/QuickReport"
// OR
var fileslocation = "/storage/self/primary/ArcGIS/AppStudio/Data/QuickReport"
... View more
05-20-2019
01:33 PM
|
0
|
8
|
1444
|
|
POST
|
I didn't set : String[] reqPermission = new String[] { Manifest.permission.WRITE_EXTERNAL_STORAGE }; Because I think that setting is already set in the Properties of the Quick Report Template. Im lost here.
... View more
05-20-2019
12:15 PM
|
0
|
0
|
1444
|
|
POST
|
Im going nuts here....Its going to be something so small.... Samsung Galaxy J7 V Model Number: SM-J727V Hardware Version: J727V.02 Android Version: 8.1.0 Kernal Version 3.18.71 Build Number: M1AJQ.J727VVRS3BSD1 Thanks for your input it is greatly appreciated.
... View more
05-20-2019
10:02 AM
|
0
|
0
|
1444
|
|
POST
|
OK I added the code below to try and get the path....downloaded to my phone and the results are below. Note the results are printed 2 times via the For Loop RESULTS ON PHONE: pathTV is: /storage/self /storage/self fsTV is: tmpfstmpfs devTV is: tmpfstmpfs urlTV is: /storage/selffile:///storage/self fileFTV is: /storage/selfundefined STILL DOES not work.....ANY THOUGHTS???? import QtQuick 2.7
import QtQuick.Layouts 1.1
import QtQuick.Controls 2.1
import QtQuick.Controls.Material 2.1
import QtGraphicalEffects 1.0
import ArcGIS.AppFramework 1.0
import ArcGIS.AppFramework.Controls 1.0
import Esri.ArcGISRuntime 100.2
App {
property var pathTV: "path"
property var fsTV: "fstv"
property var devTV: "devtv"
property var urlTV: "urltv"
property var fileFTV: "fileFTV"
id: app
width: 400
height: 640
Text {
anchors {
top:parent.top
horizontalCenter: parent.horizontalCenter
margins: 20
}
text:"StorageInfo Details"
font.pointSize: 25
}
Text {
id:content2
anchors.fill: parent
text: "pathTV is: " + pathTV +
"\n fsTV is: " + fsTV +
"\n devTV is: "+ devTV +
"\n urlTV is: "+ urlTV +
"\n fileFTV is: "+ fileFTV
font.pointSize: 16
color: "green"
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight
anchors.margins: 10
}
StorageInfo {
id:storageInfo
}
Component.onCompleted: {
var pathT, fsT, devT, urlT, fileFT;
var path, fs, dev, url, fileF;
var mountedVols = storageInfo.mountedVolumes;
for (var i = 0; i < mountedVols.length; i++) {
fs = mountedVols[i].fileSystemType;
fsT = fs + mountedVols[i].fileSystemType;
dev = mountedVols[i].device
devT = dev + mountedVols[i].device
path = mountedVols[i].path;
pathT = path + mountedVols[i].path;
url = mountedVols[i].url;
urlT = path + mountedVols[i].url;
fileF = mountedVols[i].folder.FileFolder.folderName;
fileFT = path + mountedVols[i].folder.FileFolder.path;
}
pathTV = String(pathT);
fsTV = String(fsT);
devTV = String(devT);
urlTV = String(urlT);
fileFTV = String(fileFT);
}
}
From this I tried to specify the path in the MmpkManager as follows... Top of the MmpkManager.qml FileFolder{
id: fileFolder
// readonly property url storageBasePath: AppFramework.userHomeFolder.fileUrl("ArcGIS/AppStudio/Data")
readonly property url storageBasePath: "/storage/self/ArcGIS/AppStudio/Data"
property url storagePath: subFolder && subFolder>"" ? storageBasePath + "/" + subFolder : storageBasePath
url: storagePath
Component.onCompleted: {
if(!fileFolder.exists){
fileFolder.makeFolder(storagePath);
}
if(!fileFolder.fileExists(".nomedia") && Qt.platform.os === "android"){
fileFolder.writeFile(".nomedia", "");
}
}
} Bottom of the MmpkManager.qml Component{
id: typeNetworkRequestComponent
NetworkRequest{
id: typeNetworkRequest
property var callback
method: "GET"
ignoreSslErrors: true
onReadyStateChanged: {
if (readyState === NetworkRequest.DONE ){
if(errorCode != 0){
loadStatus = 2;
} else {
var root = JSON.parse(responseText);
if(root.type == "Mobile Map Package"){
loadStatus = 1;
var component = networkRequestComponent;
var networkRequest = component.createObject(parent);
var url = rootUrl+itemId+"/data";
var fileslocation = "/storage/self/ArcGIS/AppStudio/Data/QuickReport"
var path = [fileslocation, "~"+itemName].join("/");
networkRequest.downloadFile("~"+itemName, url, path, typeNetworkRequest.callback);
} else {
loadStatus = 2;
}
}
}
}
function checkType(url, callback){
typeNetworkRequest.url = url;
typeNetworkRequest.callback = callback;
typeNetworkRequest.send();
loadStatus = 1;
}
}
}
... View more
05-20-2019
06:03 AM
|
0
|
12
|
1444
|
|
POST
|
Fantastic...this uncovered I had the path incorrect the whole time....going to give this a shot.... THANKS
... View more
05-17-2019
05:29 AM
|
0
|
0
|
2517
|
|
POST
|
Has anyone done this before.....I got this to work when I changed it to the C:/Temp/Test on my PC....but still cant get it to my phone storage card. The below first two examples show how I did this to my C Drive. In the MmpkManager.qml file at the bottom if I change the readonly property url to the below nothing happens... onReadyStateChanged: {
if (readyState === NetworkRequest.DONE ){
if(errorCode != 0){
loadStatus = 2;
} else {
var root = JSON.parse(responseText);
if(root.type == "Mobile Map Package"){
loadStatus = 1;
var component = networkRequestComponent;
var networkRequest = component.createObject(parent);
var url = rootUrl+itemId+"/data";
// ADDED
var fileslocation = "C:/Temp/tEST/QuickReport"
// COMMENTED OUT
//var path = [fileFolder.path, "~"+itemName].join("/");
// MODIFIED THE ABOVE TO THIS
var path = [fileslocation, "~"+itemName].join("/");
networkRequest.downloadFile("~"+itemName, url, path, typeNetworkRequest.callback);
} else {
loadStatus = 2;
}
}
}
} If I then go to the top of the MmpkManager.qml file and change the below it no uses the C drive and shows the mmpk file through AppStudio when I run the project. I have to make both changes to get it to work FileFolder{
id: fileFolder
// COMMENTED OUT
//readonly property url storageBasePath: AppFramework.userHomeFolder.fileUrl("ArcGIS/AppStudio/Data")
// MODIFIED TO THIS
// THIS WORKS ON THE DESKTOP
readonly property url storageBasePath: "C:/Temp/tEST"
property url storagePath: subFolder && subFolder>"" ? storageBasePath + "/" + subFolder : storageBasePath
url: storagePath
Component.onCompleted: {
if(!fileFolder.exists){
fileFolder.makeFolder(storagePath);
}
if(!fileFolder.fileExists(".nomedia") && Qt.platform.os === "android"){
fileFolder.writeFile(".nomedia", "");
}
}
} If I make the two above changes it works....I am then trying to modify that so I can use on my Phones SD Card and nothing works.... My question is am on on the right path? Are there any other modifications that I need to make to the code to get this to work? I then try this...to get to the storage card At the top of the MmpkManager.qml readonly property url storageBasePath: "/storage/Test" At the bottom of the MmpkManager.qml var fileslocation = "/storage/Test/QuickReport"
var path = [fileslocation, "~"+itemName].join("/");
networkRequest.downloadFile("~"+itemName, url, path, typeNetworkRequest.callback);
Any one have any thoughts?
... View more
05-16-2019
08:16 AM
|
0
|
15
|
2517
|
|
POST
|
Can I change the code in this location at the top of the MmpkManager.qml ???? FileFolder{
id: fileFolder
//readonly property url storageBasePath: AppFramework.userHomeFolder.fileUrl("ArcGIS/AppStudio/Data")
readonly property url storageBasePath: "/mnt/sdcard/ext_sd/ArcGIS/AppStudio/Data"
property url storagePath: subFolder && subFolder>"" ? storageBasePath + "/" + subFolder : storageBasePath
url: storagePath
Component.onCompleted: {
if(!fileFolder.exists){
fileFolder.makeFolder(storagePath);
}
if(!fileFolder.fileExists(".nomedia") && Qt.platform.os === "android"){
fileFolder.writeFile(".nomedia", "");
}
}
}
... View more
05-15-2019
07:59 AM
|
0
|
0
|
2517
|
|
POST
|
I have been chatting with Erwin Soekianto regarding my issue at the post below. At his request he told me to contact ESRI Technical Support. https://community.esri.com/message/852328-re-update-features?commentID=852328&et=watches.email.thread#comment-852328 I am trying to figure out why I cant pass the feature result from a variable to a TextField in Qt Creator for App Studio. Is there some way that someone can help or screen share to show you what I have right now?
... View more
05-15-2019
04:54 AM
|
0
|
1
|
807
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 09-20-2018 11:09 AM | |
| 1 | 09-10-2018 06:26 AM | |
| 1 | 09-15-2022 11:02 AM | |
| 1 | 05-21-2021 07:35 AM | |
| 1 | 08-09-2022 12:39 PM |
| Online Status |
Offline
|
| Date Last Visited |
09-19-2022
09:23 PM
|