Which directory can I write to that I can easily access in Android?
Might seem like a dumb question but I'm dumb. :)
On my main test device the documents and application directories sent back from PLATFORMINFO$() both have /data/data/com.livingmidnight.[whatever]/files. Unfortunately I can't seem to get to these directories with File Manager. I've checked over the SD card storage and the main memory but find nothing. Is the directory hidden when testing a debug version of an app?
File Manager seems to prevent you from accessing the file storage on the phone. And guess where the data is likely to be... :glare:
I had a look on the SD Card (even with hidden files being shown) and couldn't find anything related to my games, so it must be on the phone...
I'll try a different file manager to see if that makes a difference.
The reason I need to access the app directory (or another directory I can write to) is to get at a generated log file. Alternatively I could write a 'dev mode' style log file reader into apps with the option of reading the last log file before starting the app again. Probably a good idea. Would help with playtesting and bug reporting.
Instead of a file, could you write your logs to 'STDOUT'?
I'm not sure how to access that output from Android, as I've never compiled for my Android yet.
Also, a while back, there was discussion about creating a WebLog command.
This would send your log messages to a server on the net, using standard networking commands in GLBasic.
You would then need a receiving program on your server to accept and store this data.
Then possibly a method to view this data, or simply FTP into your server and download the log file manually.
If your device have internet connection, than you can upload the logfile or email it to yourself, when your app start next time.
But i think i like best the idea of just logging over a network connection (you wont even need internet, just a local connection to your pc). You can display log on your pc or just save it to file...
As far as i know (dont have android) STDOUT will send to your pc and there is a debugging program that can receive this, maybe someone else can help with this.
web-log is easy. just open a port tcp for listening on the device.
every time you "log", try to tcp_accept. If you did, sock_send the string and sock_close it.
On the PC-side, just tcp_connect to the device, if you get an connection, read until it returns 0. goto 10.
Ok, so log file sending over network (LAN for now) is now working. Good for me, good for wider testing in Alpha/Beta versions later. Thanks for the suggestions. =D