Test on device folder

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
gepponline
Posts: 91
Joined: Tue Sep 03, 2013 1:53 pm

Test on device folder

Post by gepponline »

I'm testing my mobile app on a phisical device.

In this app I save a file in this path:

Code: Select all

  put specialFolderPath("documents") & "\censimentofiliere.txt" into tFilePath
Where should I find this file? I can't find it in the device.

In the stand alone application settings i leave Identifier as "com.yourcompany.yourapp" and label is "censimento Filiere"

thank you!
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Test on device folder

Post by Klaus »

Attentione, amico mio!
ALWAYS use SLASH as pathdelimiter inside of LC:

Code: Select all

## BAD: put specialFolderPath("documents") & "\censimentofiliere.txt" into tFilePath
put specialFolderPath("documents") & "/censimentofiliere.txt" into tFilePath
This should be found inside of the app package on the device, because of "sandboxing" every app has its own "documents" folder!
gepponline
Posts: 91
Joined: Tue Sep 03, 2013 1:53 pm

Re: Test on device folder

Post by gepponline »

ok, but the backslash works correctly on windows.

But the most important thing is, I'm using the device to test. So the app is not "installed" in the device.
Should it has his own folder the same? I've used total commander to search for a folder that could contain my app but i didn't find it
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Test on device folder

Post by Klaus »

Hi Geppo,
gepponline wrote:ok, but the backslash works correctly on windows.
yes, and only there 8)
gepponline wrote:But the most important thing is, I'm using the device to test. So the app is not "installed" in the device.
Should it has his own folder the same? I've used total commander to search for a folder that could contain my app but i didn't find it
Maybe you should first tell me what we are talking about Android or iOS?


Best

Klaus
gepponline
Posts: 91
Joined: Tue Sep 03, 2013 1:53 pm

Re: Test on device folder

Post by gepponline »

Android! ☺
On a nexus 4 with 5.0.1 installed
dave.kilroy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 858
Joined: Wed Jun 24, 2009 1:17 pm
Contact:

Re: Test on device folder

Post by dave.kilroy »

Hi gepponline

I've just recently moved back to developing for Android after a long spell with iOS and I too wanted an independent way to check/test file locations on Android (see http://forums.livecode.com/viewtopic.php?f=53&t=23503) - but without rooting your device (btw I'm also testing on a nexus4 - such a nice piece of kit) you won't be able to see it even with apps like total commander. You can check for the existence of folders and files within the app 'sandbox' with LiveCode just fine which I think we have to be satisfied with...

Good luck!

Dave
"...this is not the code you are looking for..."
jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7423
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Test on device folder

Post by jacque »

The app's documents folder is stored in data/data/ on Android and is only accessible if you have root access.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
Post Reply