简体   繁体   English

当失去互联网连接时,如何将数据存储在列表中并重新发送

[英]when internet connection is lost how do store the data in a list and resend

我正在尝试从我的android app将数据发布到服务器上。如果服务器和客户端之间的连接丢失了,我需要将这些值存储到列表中并通过不断尝试连接来重新发送这些值。

您可以使用sqlite存储此数据,然后使用AsyncTask doInBackground()尝试检查Internet连接并将该数据发送回您的服务器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 重新建立连接后,将数据重新发送到服务器 - resend data to server when connection is back android如何获取指示何时互联网连接丢失? - android how to get indicate when the internet connection is lost? 当 android 中的 Internet 连接丢失时通知用户 - Notify user when Internet connection is lost in android Android中如何处理没有互联网和丢失的连接? - How to handle with no Internet and lost connection in Android? 当WIFI打开但没有数据连接时,如何在android中检查互联网连接? - How to check the Internet connection in android when WIFI is On but No Data Connection? 从服务器获取数据时处理Android丢失的Internet连接 - Handling Lost Internet Connection Android While fetching the data from the server 断开互联网连接后,防止在Web视图中打开URL - Prevent opening an URL in a webview when the internet connection is lost 失去互联网连接时(8.0+)的JobScheduler用于启动应用程序 - JobScheduler for start app when internet connection is lost (8.0+) 当应用程序处于后台并且互联网连接断开时,应用程序将崩溃 - when app is in background and if internet connection lost, app is getting crashed 在运行过程中失去互联网连接时,取消AsyncTask - Cancel AsyncTask when internet connection is lost in the process of running
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM