UserService class 是如何工作的?
How does UserService class work?
我正在尝试使用 Android Studio LoginActivity 模板实现登录系统。在 AppEngine 上,我尝试了以下两行:
UserService userService = UserServiceFactory.getUserService();
User user = userService.getCurrentUser();
但用户始终为空。
它应该如何运作和实施?
我的意思是,UserService class 是否仅在将登录与 Google 帐户集成时才有效?
如果是,对我来说实现自定义登录系统的最佳和最明智的方法是什么?
是的,UserService class 仅在将登录与 Google 帐户(Gmail 或 Apps)集成时才有效,here 是您可以处理的方式。
关于自定义登录系统,没有正确答案,您需要根据自己的需要实现一个API(登录、注册、重设密码...)的系统。当然,您需要一个数据存储实体来保存登录过程的帐户信息和密码。
我正在尝试使用 Android Studio LoginActivity 模板实现登录系统。在 AppEngine 上,我尝试了以下两行:
UserService userService = UserServiceFactory.getUserService();
User user = userService.getCurrentUser();
但用户始终为空。 它应该如何运作和实施? 我的意思是,UserService class 是否仅在将登录与 Google 帐户集成时才有效?
如果是,对我来说实现自定义登录系统的最佳和最明智的方法是什么?
是的,UserService class 仅在将登录与 Google 帐户(Gmail 或 Apps)集成时才有效,here 是您可以处理的方式。
关于自定义登录系统,没有正确答案,您需要根据自己的需要实现一个API(登录、注册、重设密码...)的系统。当然,您需要一个数据存储实体来保存登录过程的帐户信息和密码。