Page 1 of 1

Saving does not work on some mobile devices

Posted: Sat Dec 23, 2023 12:52 pm
by nacheon
hello,

Currently, ES3 is used in mobile games to locally store binary data (zip-compressed xml data) received from the server.
The storage function is as follows.

public void UpdateCommonData(CommonDataType type, byte[] compressedData)
{
ES3.SaveRaw(compressedData, getCommonDataFileName(type));
}

It works normally on most devices, but on some devices it seems like the file cannot be saved. However, it is not being saved, but no other errors are occurring.

I have attached the current ES3 settings.

Do you have any issues related to this?

Re: Saving does not work on some mobile devices

Posted: Sun Dec 24, 2023 10:43 am
by Joel
Hi there,

Have you put Debug.Log calls alongside your save call to check it's being called? For example some events such as OnApplicationQuit don't get called on mobile.

Re: Saving does not work on some mobile devices

Posted: Tue Dec 26, 2023 2:22 pm
by nacheon
The above save function is used when the user first runs the game.
The data to be saved is received from the server and stored locally.
This issue is not caused by app termination.

And, because this problem is occurring to some users, it is difficult to reproduce in a test environment.

However, in the last update, we added try catch so that an error message is displayed as a pop-up when an exception occurs and we confirmed that the message below appears from users experiencing the problem.

[ Android 14 - error when loading. Error is "input string was not in correct format" ]

Regarding this, is there anything else to check?

Re: Saving does not work on some mobile devices

Posted: Wed Dec 27, 2023 9:28 am
by Joel
Hi there,

Because you're storing your own formatted data, any System.FormatExceptions will be thrown by your code rather than ours. If it's being thrown by our code then it indicates that you're trying to read your XML formatted data using our methods, which isn't possible.

All the best,
Joel