Load sounds not only from data folder?

Monkey Forums/Monkey Programming/Load sounds not only from data folder?

Midimaster(Posted 2013) [#1]
Is there meanwhile a way to load sounds not only from data folder? My app needs to load user sounds from a SD Card...

I'm not sure about the limitations of the new LoadSoundAsync()....
What about doing this on a android device?

Or as an alternative: What about loading them from the web, but afterwards saving them local on the device for the next day?


Tibit(Posted 2013) [#2]
Your data folder is more or less your sim card seen from the Application's point of view when you are on a device.

A SD card is not exactly like a harddrive, an App usually don't have full write access. However I think it is possible on Android to create an "file explorer". However this is not normal App behavior and something you want to do only when create an App that has explicit use for this.

However loading with Async is something I want to do myself. Just haven't tested it yet. I would then also like to save the file to the "app data container" so I don't have to download it again unless it changes.

So if you find a solution, please share! :)


marksibly(Posted 2013) [#3]
There's actually experimental monkey://external/ support in the android target - however, it doesn't work in the current version.

This might though:

https://github.com/blitz-research/monkey/blob/develop/targets/android/modules/native/androidgame.java


Midimaster(Posted 2013) [#4]
Thank you Mark. It is nice to hear, that you are planning to open the access to external storage also on android.

I think there are a lot of people waiting for this. They want to load music datas or pictures of the users to manipulate them or simply use them in the games.

Also it would be helpful to save back the results to the storage, where the use can share them with others.

My current app does not need the feature, but the next one will. So I can wait until this is an official feature of a future version of monkey.