本文介绍了如何检查当前用户是否已登录android的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何检查当前用户是否已登录android. 我有一个外部数据库,我已成功将其连接到数据库. 我需要检查用户是否已登录
How to check if current user is logged in android. I have an external database, I have successfully connected it to the database. I need to check if the user is logged in or not
如果未登录的用户将显示{注册活动},否则将显示{我的信息活动}
if user not logged will display {register activity} otherwise will display {my info activity}
推荐答案根据此:
要检查用户是否已登录,请调用isConnected().
To check if the user is signed-in, call isConnected().
if (mGoogleApiClient != null && mGoogleApiClient.isConnected()) { // signed in. Show the "sign out" button and explanation. // ... } else { // not signed in. Show the "sign in" button and explanation. // ... }更多推荐
如何检查当前用户是否已登录android
发布评论