Where to store persistent files like photos and audio?

Home / Forums / Marmalade Archive / Marmalade System / Where to store persistent files like photos and audio?
1 reply [Last post]
by: shikeyou
Status: Offline
Joined: 2012-04-29
Points: 330

Hi,

I have a question about where to store persistent files for my app.

First of all, when I save files to the ram:// drive, I can't figure out where they are saved to on my Android phone. It's not good for users because they can't figure out where their files are.

I then tried to use "AndroidUseSdcard=1" in icf file, which saves my files to /mnt/sdcard/Android/data, so at least I know where my files are. But the files are gone after I uninstall the app. This is not ideal for files that should be persistent e.g. photos, audio files etc even if app is uninstalled.

Ideally I would like to store these persistent files in a more prominent directory e.g. /mnt/sdcard/MyAppName that will not get deleted with app removal, like how a lot of apps are doing it.
What's the best way of doing this? Using absolute paths like raw:///mnt/sdcard?

Any suggestions and best practices?

by: shikeyou
Status: Offline
Joined: 2012-04-29
Points: 330
I just tried to do the same

I just tried to do the same thing in PhoneGap.
filesystem.root.fullPath returns "file:///mnt/sdcard", which seems like what I need.
Is there any way to switch to this default behaviour from PhoneGap?

Latest Posts

Latest Comments

Top Contributors

  • Chris D : 27,010
  • MonRoyals : 26,970
  • Salman : 26,720
  • Jez Hammond : 20,130
  • pjan : 11,150
  • gjw : 10,350
  • Paolo Oliverio : 9,640
  • Beaker_2 : 8,390
  • Kite : 8,210
  • bluescrn : 7,810