When appwarp returns connection error recoverable when not recoverable?

0 votes
Hi All

I have a real time game which uses both appwarp and app42. Now my questions are:

1-When appwarp returns connection error recoverable when not recoverable connection error?

2- I know a game which is again a real time game(not using shephertz products). While I am in main menu in that game, I close wifi and open 3g connection, application stays as it should be. But when I close wifi and 3g, application redirects me to offline mode. How can I achieve that using app42 and appwarp?

Thanks
asked Aug 16, 2016 in Unity by gokhan (20 points)

1 Answer

0 votes
Hi Gokhan,

It can be achieved as follows:

1. When you get connection_error_recoverable, you can try calling recoverConnection API once immediately or after 1 sec before showing any UI message for connection recovery.

2. If the connection is recovered in the first call of recoverConnection then ok, otherwise you can go ahead and notify the user about the connection recovery.

This way the case of disconnection can be handled without showing anything to the game user as it occurs for a very short duration.

Please let me know if you have any other queries.

Regards,

Rajeev
answered Aug 17, 2016 by rajeev.etc (1,660 points)
Hi Rajeev
Can you please write the appwarp code snippet needed for this logic? I could not manage to do it still.
No one here?
Could you please share the code you have written for this so that we can look into it and suggest.
Hi Rajeev
I managed to do things above. Now my question is that: lets say while in main menu, user's connection lost. I directed player to offline mode. This part is ok. When wifi is on again while user is in offline mode, I should automatically redirect him to online mode. How can I do this?
There is two way to do it. First, you can write network monitoring logic which can notify you whenever internet is on then you can call recover connection API.
Second, you can keep calling recover connection API after certain time interval e.g. after every 3 or 5 seconds. If internet is on within the recovery allowance time then the session will be recovered other you will have to call connect API again.
Hi Rajeev
You said that "keep calling recover connection API after certain time interval e.g. after every 3 or 5 seconds. ". Does it change api call count while user is offline?
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...