You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ping/pong is enabled to identify the lost connection. For connection to work properly in Android mobile sleep mode, we should be able to disable ping/pong in sleep mode and enable it back again when device wakes up.
Current Behavior
In Android mobile goes to sleep mode, when we disable ping/pong using setConnectionLostTimeout(0). It works fine. But when we enable ping/pong (when device wakes up) using setConnectionLostTimeout(30), it does not work. When we checked, we find that the timer is destroyed on setConnectionLostTimeout(0). We expect it to be created and set on setConnectionLostTimeout(30). But it does not happen. Because of this, we don't have any method of enabling ping/pong once it is disabled.
Expected Solution
Currently disabling the ping/pong by setConnectionLostTimeout(0) is working. Library has to make the necessary changes to ensure ping/pong is enabled back when setConnectionLostTimeout(30) is called.
(or) If Library adds 2 separate methods to enable and disable ping/pong, that will be even better.
.
Steps to Reproduce (for bugs)
Use the lib to create the android client app
Connect with websocket server.
Enable ping/pong in android app
Set setConnectionLostTimeout(0) in android device sleep mode
Set setConnectionLostTimeout(30) when android device waked up
Put android device in sleep mode - the ping/pong disabled due to setConnectionLostTimeout(0)
Put android in normal mode - the ping/pong didn't enabled event after setConnectionLostTimeout(30). From debug identified the timer is already destroyed.
What do you think is the better approach? I am in favour of adding the possibility to reactivate the lost connection detection with the setter rather then adding an additional method.
Could you also provide a simple application for me since I haven't done any android app.
@marci4 ,
We create an android sample app for the issue testing. Please use this attached apk and connect to any webSocket server with ping/pong.
Instructions are provided in the attached ppt. Follow the same to reproduce the issue and please let us know any further queries...
Hello @anish,
I don't know much about programming and I've been finding it difficult to build my own Binary.com webSocket API connection system.
Pls I'll be willing to pay for your service if you can help me build for PC and mobile.My email is..
@marci4 ,
Any update on this issue. we already shared the android app which can reproduce the issue. please revert with your suggestions for the same. If any clarification required, please let me know
Hello @anishlg,
Sorry for not responding to use. Right now I am very busy and forgot to answer you.
I wrote the code and did not have this use case in mind (since this library is designed for java in the first place).
I just asked for the code to get a better understanding what is the best approach.
Never the less I cannot promise that I can integrate this feature soon since I am busy right now with a lot of work.
Activity
marci4 commentedon Apr 26, 2018
Hello @anishlg,
thank you very much for opening this issue!
What do you think is the better approach? I am in favour of adding the possibility to reactivate the lost connection detection with the setter rather then adding an additional method.
Could you also provide a simple application for me since I haven't done any android app.
Thank you very much!
Best regards,
marci4
anishlg commentedon May 3, 2018
@marci4 ,
We create an android sample app for the issue testing. Please use this attached apk and connect to any webSocket server with ping/pong.
Instructions are provided in the attached ppt. Follow the same to reproduce the issue and please let us know any further queries...
android.zip
Best regards,
Anish
Adezking commentedon May 8, 2018
Hello @anish,
I don't know much about programming and I've been finding it difficult to build my own Binary.com webSocket API connection system.
Pls I'll be willing to pay for your service if you can help me build for PC and mobile.My email is..
Adezking2007@gmail.com
THANKS.
anishlg commentedon May 11, 2018
@marci4 ,
Any update on this issue. we already shared the android app which can reproduce the issue. please revert with your suggestions for the same. If any clarification required, please let me know
Regards,
Anish
marci4 commentedon May 11, 2018
Hello @anishlg,
Sorry for not responding to use. Right now I am very busy and forgot to answer you.
I wrote the code and did not have this use case in mind (since this library is designed for java in the first place).
I just asked for the code to get a better understanding what is the best approach.
Never the less I cannot promise that I can integrate this feature soon since I am busy right now with a lot of work.
Best regards,
marci4
Enable and Disable ping/pong
marci4 commentedon May 14, 2018
Hello @anishlg,
this issue should be solved with #708.
Could you maybe try it out?
Thank you!
Best regards,
marci4
Gillardo commentedon Jun 10, 2018
Any idea when this will be available?
marci4 commentedon Jul 6, 2018
This issue is already in the master!
Closing it!