I’ve seen a few threads on this but could not find my exact issue.
I use SQLite3 for the savegame of my games. My code works on 99.9% of the devices (Millions of them) but I receive logs from time to time where a user get a SQLITE_CANTOPEN. So, the user is never able to save its progress. I use this basic code to create the DB:
std::string dbPath = cocos2d::FileUtils::getInstance()->getWritablePath() + "save.db"; result = sqlite3_open(dbPath.c_str(), &pdb);
And I get a result SQLITE_CANTOPEN. I do have the write permission in the AndroidManifest “android.permission.WRITE_EXTERNAL_STORAGE” and this never happen on iOS, only small percentage of user on Android.
I’ve read that on API 23+ you need to ask runtime permission or something, but it seems only related to external permission outside your sandbox which is not the case here and if it was the case I would get a huge more amount of errors and complains.
Any idea why this would happen? Anyone else has the same issue?