Connection doesn't recover when change 3G to wifi and vice versa

0 votes

Hi,

I asked this a few days ago but I was not very specific.

When I change from 3G to WIFI or WIFI to 3G I can no longer use my chat or any other AppWarp services.

Here is my ConnectDone code:

 

public void onConnectDone(final ConnectEvent event) {
    Log.d("con", "CD"+event.getResult());
    handler.post(new Runnable() {
        @Override
        public void run() {
            //   progressDialog.dismiss();
            if (event.getResult() == WarpResponseResultCode.SUCCESS) {
                Log.d("con", "Connection success");
            } else if (event.getResult() == WarpResponseResultCode.SUCCESS_RECOVERED) {
                Log.d("con", "Connection recovered");
            } else if (event.getResult() == WarpResponseResultCode.CONNECTION_ERROR_RECOVERABLE) {
                Log.d("con", "Recoverable in 5");
                handler.postDelayed(new Runnable() {
                    @Override
                    public void run() {
                       
                        GeoChatSingleton.theClient.RecoverConnection();
                    }
                }, 5000);
            } else {

            }
        }
    });
}

 

When I change from 3G to WIFI event.getResult() produces a code of 9, i.e. recoverable. It tries to do that and then after the handler is called it gets a code of 1, i.e. AUTH_ERROR. Why is this happening and how can I change it?

I am using the MultiplayerGaming SDK on Android and I have got the listeners set up. The app runs perfectly if I stay on WIFI and similarly if I stay on 3G but changing is the issue. I have set up connection resiliency.

asked Aug 12, 2015 in AppWarp by Kiaan Pillay (20 points)
recategorized Aug 13, 2015 by sushil
In case of auth_error, you also get reasonCode in the ConnectEvent which you can get using "event.getReasonCode()". Can you please share the reason code you are getting? It will help us to debug the problem.
Reason code is 0 when I Connection recoverable and AUTH error

1 Answer

0 votes
Hi Kiaan,

I tried to replicate the issue at my end by switching from 3G to Wi-Fi and vice-versa but unable to replicate the same. Can you please let me know some more details like steps to reproduce, logs, code which you are using to initialise AppWarp etc. It will really help to debug the problem.

Thanks.
answered Aug 13, 2015 by rajeev.etc (1,660 points)
You must use a real device in order to test this. I am using a Samsung Galaxy S6.

Start with both WIFI and data on
Once in the app is connected to AppWarp kill the wifi and this is when I get the connection recoverable error which turns into an auth error. Often WIFI to 3G actually recovers but sometimes this error occurs. However 3G to WIFI seems to produce the auth error 95% of the time. Do you want any of the AppWarp log statements as well?
For obvious reasons I did not post my API key here. If I allow the recovery allowance time to complete it does successfully reconnect my connection but of course it is a new session as it disconnects from all rooms
Any update on the question?
We are trying to reproduce it on our end.So we will update you soon once we will find the valid reason for this.
We have tried to produce the same issue no Samsung Note, but unable to get it for both the ways. Can you please share your source then we can exactly identify the problem.
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
...