question

martinstrohacker avatar image
martinstrohacker asked

How to handle ServiceNotReadyEvent?

I am using the Unity plugin. I find that when the device is connected to a wi-fi network without an internet connection, Whispersync waits 60 seconds after the AGSClient.Init call and then I get the AGSClient.ServiceNotReadyEvent. Before and after this event, calls to AGSSyncableDeveloperString.getValue() return null, meaning that my code cannot access the user's game progress data. My first question is if this is expected behaviour? In other offline cases (no network, no GameCircle login) the AGSClient.ServiceReadyEvent fires quickly after initialization and then AGSSyncableDeveloperString.getValue() returns a correct value for my app to process the user's last offline game progress. My second question is how is an app supposed to handle this case? If the developer string is unavailable then the user sees the app run with all the game progress lost which I do not want to happen.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

martinstrohacker avatar image
martinstrohacker answered
The patch for SDK 2.4.4 fixed this issue. Even with this patch, when connected to a network without internet access Whispersync still waits 60 seconds before firing the Service Ready event. So I changed my code so that it no longer waits for this event before getting the save data from Whispersync.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.