Hi,
I'm troubling to use connection resiliency functionality of appwarp.
I used both API methods RecoverConnectionWithSessionID() and tried to connect after setRecoveryAllowance()
In first try I stored the sessionID of last succesful connection and tried to reconnect with it. But RecoverConnectionWithSessioId() didn't trigger onConnectDone.
Below is the code piece that I used:
WarpClient.initialize(apiKey, secretKey);
WarpClient.setRecoveryAllowance(60);
WarpClient.GetInstance().AddConnectionRequestListener(listen);
WarpClient.GetInstance().AddLobbyRequestListener(listen);
WarpClient.GetInstance().AddNotificationListener(listen);
WarpClient.GetInstance().AddRoomRequestListener(listen);
WarpClient.GetInstance().AddUpdateRequestListener(listen);
WarpClient.GetInstance().AddZoneRequestListener(listen);
...
sessionID = LoadSessionID();
if(sessionID != 0)
WarpClient.GetInstance().RecoverConnectionWithSessioId(sessionID, FB.UserId);
else
WarpClient.GetInstance().Connect(FB.UserId);
I also tried to reconnect without storing the sessionID. Though I recieved OnConnectDone event I got result code AUTH_ERROR instead of CONNECTION_ERROR_RECOVERABLE.
Below is the code piece:
WarpClient.initialize(apiKey, secretKey);
WarpClient.setRecoveryAllowance(60);
WarpClient.GetInstance().AddConnectionRequestListener(listen);
WarpClient.GetInstance().AddLobbyRequestListener(listen);
WarpClient.GetInstance().AddNotificationListener(listen);
WarpClient.GetInstance().AddRoomRequestListener(listen);
WarpClient.GetInstance().AddUpdateRequestListener(listen);
WarpClient.GetInstance().AddZoneRequestListener(listen);
WarpClient.GetInstance().Connect(FB.UserId);
My execution step was:
1) Connect()
2) Join a room or create a new one
3) subscribe to room
4) Close the app from android's task manager
5) Run the app and try to reconnect.
I am using the latest sdk.
Do you have any idea what may cause this?