What is a good way to set directory paths?

04-27-2016 10:37 PM
Occasional Contributor III

Specifying file paths in AppStudio Apps like this

property string gdbPath: "~/ArcGIS/AppStudio/Apps/" + appItemId + "/Data/gdb.geodatabase"

works when I run the app via AppStudio Player, but when I build the app and install it on an Android device the app seems to be unable to read and write files in those locations. What is the recommended way of referencing directories?


Tags (2)
0 Kudos
2 Replies
New Contributor III

Hi Tobias,

When you build an app, the files get bundled into an internal resources folder. Therefore to use a locally stored geodatabase in a standalone app you need to copy the gdb out of the resources folder.

Check out the sample - Local Runtime GDB and TPK.

Hope this helps.

Occasional Contributor III

Thank you Gareth, that does help. The Local Runtime GDB and TPK sample already downloads with the GDB and TPK. Now I'm wondering how you'd do that when the app is to download a GDB and TPK separately from the App download - I've got some things to explore now, thank you for pointing me in the right direction.

0 Kudos