Android Permissions

About Monkey 2 Forums Monkey 2 Programming Help Android Permissions

This topic contains 19 replies, has 6 voices, and was last updated by  PhatPeter 10 months, 1 week ago.

Viewing 5 posts - 16 through 20 (of 20 total)
  • Author
  • #11088


    On Android and iOS I normal create a hidden folder using the dot in front (.myfolder) on Android this is normally in the root of external storage, on iOS you can have trouble getting your app through iTunes review depending on where you store data and how much you store, they dont like you storing lots in the Documents directory as that is part of the default iCloud backup, so I use NSCachesDirectory.

    I created modules for my specific needs on Monkey1 and slight modified brl/filesystem module to get it to work on both platforms correctly, I will try and post the modules if helpful.


    Mark Sibly

    On android, any reason you don’t use “internal:”, or if you have large-ish files, perhaps this:

    …which apparently requires no special permissions on KitKat+, so I was thinking of making it the “external:” of choice for monkey2 (which currently doesn’t even support “external:”). Root dir of external can be made available differently. I’m guessing getExternalFilesDir it’s the one we’re supposed to use anyway.

    It would definitely be useful to find out some of the needs people have for fileio, and what the best approaches are. For example, I take it people want acces to media dirs like pictures, music etc. Anything else?

    Any suggestions for general filesystem (or other) module improvements would be greatly appreciated too – feel free to post any source code you have!



    I am not sure there is any right way on Android, you look at the filesystem on your phone and you see apps storing stuff all over the place!  But that looks good for default external, for my particular uses I am creating/deleting folders and files, checking storage space and getting a list of files from folders.

    I am downloading large amount of big files from a web server and storing them locally also creating images in the app and storing them locally.

    I use brl/filesystem/stream for storing stuff from within the app to local storage, I just had to re-write the CreateDir function recently for iOS to make it compatible with new iOS versions:

    I then have a async download/store module that can download files from a server and store them locally in the background.  It also has some functions to list folders, check space and such.  This is all created for my specific needs but this sort of stuff is all very useful.



    I’m in the same boat as kheldar13 – I would love to have somewhere quick and easy to store some internal settings on android.  High-scores, level state, parental controls, etc (in txt / json / csv format).  I would also like these settings to be readable (and ideally writable if possible) by other apps.

    Further into the future, I’d also like to be able to store images derived from cropped/edited photos taken on the device or from other sharing sources (whatsapp, downloads…) to allow custom images to be used in my app.



    I would like to be able to load and save JPG’s & PNG’s from the Android PhotoAlbum & Cam -folders.

Viewing 5 posts - 16 through 20 (of 20 total)

You must be logged in to reply to this topic.