|
Filesystem access on android |
nshade
Member #4,372
February 2004
|
When writing an android app using allegro (NDK), i need to be able to write to the actual filesystem. I know that I can use al_android_set_apk_file_interface() and al_android_set_apk_fs_interface() to set the filesystem to the apk, but I need to be able to write to the actual filesystem to save my config files and to read user themes. When trying to use al_path_cstr() on android without setting the apk file interface, the program segfaults. How does one access the main/external flash? |
Chris Katko
Member #1,881
January 2002
|
Does your program request, and have, permission to access the file system? -----sig: |
Elias
Member #358
May 2000
|
al_set_standard_file_interface otherwise to switch back -- |
nshade
Member #4,372
February 2004
|
Nope it's returning nulls when I try and do anything with the "normal" filesystem. When I try and get a path, it segfaults Here's my test program == EDIT == |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Please share the solution. How do you access the filesystem on Android? I see, test_path was NULL. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
nshade
Member #4,372
February 2004
|
Yea, I wasn't assigning test_path to anything. It's really tough to get meaningful errors out of an Android app. I use stdout/stderr to log my debug messages, and those are piped to /dev/null on the platform Also it looks like the android version of allegro deson't support Android Video. |
|