简体   繁体   English

在应用程序中处理离线和在线用户的最佳方法是什么?

[英]What the best approach to handle offline and online user in app?

I have an app and I want to handle online and offline users, which when user destroy the app from the background I have to send to the server that this user is offline now, otherwise send online我有一个应用程序,我想处理在线和离线用户,当用户从后台销毁应用程序时,我必须将这个用户现在离线的服务器发送到服务器,否则在线发送

make a server request in onDestroy method onDestroy: The final call you receive before your activity is destroyed.在 onDestroy 方法中发出服务器请求 onDestroy:在销毁活动之前收到的最终调用。

public void onDestroy() {
super.onDestroy();
}

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

相关问题 在线/离线用户功能 firestore 或实时有什么更好的解决方案? - What is better solution for online/offline user feature firestore or realtime? 在struts2中处理会话超时的最佳方法是什么 - What is the best approach to handle session timeouts in struts2 使用户在线/离线状态 - Get User online/offline state 使用启用了蓝牙的生物识别设备验证用户的最佳方法是什么? - What is the best approach to validate user using Bluetooth enabled biometrics device? 保持电话应用程序登录的最佳实践是什么? 令牌方法安全吗? - What is the best practice to keep a phone app logged in? Is the token approach safe? 什么是对AWS用户处理java.net.UnknownHostException的最佳方法? - What can be the best approach to handle java.net.UnknownHostException for AWS users? 初始化对象的最佳方法是什么 - What is the best approach for initialize object 使用JasperReports的最佳方法是什么? - What is the best approach to use JasperReports? Java分类-最佳方法是什么 - Java classification - what is the best approach 学习java的最佳方法是什么 - what is the best approach to learning java
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM