且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Firebase:如何保持Android用户登录状态?

更新时间:2023-08-21 10:02:46

[Firebase的工程师]为了透明地处理Firebase Simple Login Java客户端中的持久性会话,您需要使用接受Android的两个参数的构造函数上下文,即每次实例化简单登录Java客户端时为SimpleLogin(com.firebase.client.Firebase ref, android.content.Context context).

[Engineer at Firebase] In order to transparently handle persistent sessions in the Firebase Simple Login Java client, you need to use the two-argument constructor which accepts an Android context, i.e. SimpleLogin(com.firebase.client.Firebase ref, android.content.Context context) every time you instantiate the Simple Login Java client.

请参见 https://www.firebase. com/docs/java-simple-login-api/javadoc/com/firebase/simplelogin/SimpleLogin.html 获取完整的API参考.

See https://www.firebase.com/docs/java-simple-login-api/javadoc/com/firebase/simplelogin/SimpleLogin.html for the full API reference.