I'm currently working on an application based on some original open source code. As I'm still learning java I need some assistance resolving a problem surrounding receiving data via a socket. The process is per below:
Connect to socket
Receive initial data
Receive more data
Ping socket again to do the same as above (in loop)
The class then needs to be able to handle the following:
- If connection fails (i.e. lost wifi or mobile data), it is retried for 3 times. If still doesn't work, thread exits safely.
- Manual disconnect of the socket including exiting the thread safely, then being able to reconnect with new thread.
As mentioned a lot of the code is written but it needs some tweaking, or possibly if the best method to convert to an asynctask.
See attached socketdatareader and call to create new thread.
Full access to bitbucket git will be given on starting.
Note that, large value minimum milestones are not going to win the work. It may only take a few hours to get what I need.