Sharing data between platforms

Sharing data between platforms
0.0 0


Hi all. I’m trying to find a common storage area where I can save a file created by an Android activity which then gets picked up by the Cocos code.

I’ve read cocos has access to /data/data/ but android doesn’t as such this gives me a permission denied error, even with the WRITE_EXTERNAL_STORAGE permission applied.

The method getExternalStorage gives /mnt/sdcard. Is this any good for cocos, and if so how can I access that?

Many thanks.


Where did Android activity save file in?


Android saves the file is /mnt/sdcard as I already said above.

To make this an easier topic… how do a save a file to the SD Card, from Cocos?


You can use standard c function, fopen…