I’m looking for a way to save a file into internal storage on Android. I need this to store app’s settings. If I’ll store it on external memory - I think every user can remove this settings-file or reset some options there
Where is you store your game settings?
For example, reading and writing into internal Android memory:
To save program settings you can use CCUserDefault class. For example saving bool:
CCUserDefault::sharedUserDefault()->setBoolForKey(“FIRST_LAUNCH”, false);
CCUserDefault::sharedUserDefault()->flush();
and reading this bool:
bool firstLaunch = CCUserDefault::sharedUserDefault()->getBoolForKey(“FIRST_LAUNCH”, true);
To save program settings you can use CCUserDefault class. For example saving bool:
CCUserDefault::sharedUserDefault()->setBoolForKey(“FIRST_LAUNCH”, false);
CCUserDefault::sharedUserDefault()->flush();
and reading this bool:
bool firstLaunch = CCUserDefault::sharedUserDefault()->getBoolForKey(“FIRST_LAUNCH”, true);