Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Android / File Location on Android

Author
Message
girishsarwal
8
Years of Service
User Offline
Joined: 3rd Feb 2016
Location:
Posted: 7th Oct 2016 08:04
I am using AppGameKit (Tier2 - NDK) as an underlying game engine for an app . As I understand, the assets (configuration files + media in this case) get zipped up in the APK so i am extracting and copying them into the /data/data/com.mycompany.mytemplate/files folder on app startup. I am doing this so users can default to the original configurations when the folder is emptied out.

copying files using agk:penFileToRead and OpenFileToWrite is painfully slow as the entire asset is decompressed over and over again with each line read so i wrote custom c++ code to mkdir folders and fwrite file in the /data/data/com.mycompany.mytemplate/files folder. The assets get copied over recursively successfully, but now i cannot use "/data/data/com.mycompany.mytemplate/files/backgrounds/bg.jpg" as an input to the agk::LoadImage function. I am unsure if this is a path issue, This is what I've tried already:

- tried to load from files/backgrounds/bg.jpg
- tried to load from backgrounds/bg.jpg - *the asset gets picked up but since the asset name is also backgrounds/bg.jpg, i believe this is being picked from the zipped up assets in the APK and not from the user folder*

Any help is appreciated!
Thanks

Login to post a reply

Server time is: 2024-04-27 13:10:08
Your offset time is: 2024-04-27 13:10:08