Android HTTPS exception Connection reset by peer

前端 未结 1 1240
悲哀的现实
悲哀的现实 2020-12-16 06:27

I\'m working on an application which is downloading data from a web server.It seems to download data without any problems in the beginning, but a few days ago I start receiv

相关标签:
1条回答
  • 2020-12-16 06:42

    Actually there are two options that you can do in this situation. You can catch that exception while downloading data over internet and create a function which will start the connection again from where it stops. So you have to find a way to save your progress while downloading the data,because if you're downloading big size of data it's not a good idea to start the process again.

    Another thing that you can do is to create a dialog, which will inform the user that there is error while synchronizing and let him to choose if he want to retry the operation or cancel it.If user select Retry option I think it will be a better option to start the connection again from the where it stops again. So you have to save your progress in both ways. I think that's more user friendly.

    0 讨论(0)
提交回复
热议问题