如何检查当前用户是否已登录android

编程入门 行业动态 更新时间:2024-10-25 06:23:49
本文介绍了如何检查当前用户是否已登录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

本文发布于:2023-11-07 01:02:35,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1565130.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:用户   android

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!