documents directory

Hi. I’ve created a file in using system.pathForFile( file, system.DocumentsDirectory). Where on my Android phone can I find this directory? What would it’s absolute path be? Thanks.

programmer [import]uid: 23949 topic_id: 6154 reply_id: 306154[/import]

It’ll be in

/data/data/“package name for your app”/app_data

[import]uid: 8872 topic_id: 6154 reply_id: 21088[/import]

Thanks. Do I need root access for this? Under /data I have… nothing. Under /sdcard/data I don’t have another data directory. [import]uid: 23949 topic_id: 6154 reply_id: 21090[/import]

You might yeah. You can also check files in the simulator…

go to:

/Users/username/Library/Application Support/Corona Simulator/

You’ll see a temp directory there created for your app for this session of the simulator. Its alot easier to just do that and get your code working than to keep reading the data back off the device. [import]uid: 8872 topic_id: 6154 reply_id: 21091[/import]

Yeah you can use adb logcat

Just cd to your android sdk folder and platform-tools and run ./adb logcat

it’ll display the running log to the terminal. Various versions of the sdk have problems handling subfolders btw, not sure if you’re trying that or not? [import]uid: 8872 topic_id: 6154 reply_id: 21093[/import]

Yeah I know, I was wanting to see it on my phone as my app is behaving in the simulator but not on the phone, so I log to a file. Or is there a better way of doing it (logging)? Someone mentioned an Android log. Thanks for your time.

Edit: I notice a lot of apps write directly under /sdcard/ [import]uid: 23949 topic_id: 6154 reply_id: 21092[/import]

When I run ADB it starts the server/daemon and says -waiting for device-. If I run ‘adb devices’ it reports a device.

List of devices attached
0354000030745709 device

However adb logcat just says -waiting for device- over and over. After a while it starts reporting

ADB server didn’t ACK
* failed to start daemon *
error: cannot connect to daemon
* daemon not running. starting it now on port 5037 *

over and over. Any ideas? I’m referring to http://developer.android.com/guide/developing/tools/adb.html. I’ll keep trying. [import]uid: 23949 topic_id: 6154 reply_id: 21095[/import]

Hmm wierd. are you sure you have the latest SDK? [import]uid: 8872 topic_id: 6154 reply_id: 21098[/import]

Only got it some weeks ago but will check. I’m running Win 7 64 bit BTW in case it makes a diff. Thanks. [import]uid: 23949 topic_id: 6154 reply_id: 21099[/import]

Ohh, you’re on windows. Sometimes there’s issues on windows machines. Google for the exact errors you’re getting and there’s probably an easy fix [import]uid: 8872 topic_id: 6154 reply_id: 21101[/import]

Yep :slight_smile: Damn… just updated but still same problem. I might try on XP 32 bit.

Edit: turned out USB debugging wasn’t enabled on the phone. I forgot to re-enable it after a backup/restore :S [import]uid: 23949 topic_id: 6154 reply_id: 21110[/import]