- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
嘿对不起,如果这是一个愚蠢的问题,但这真的让我很生气。
if (ParseUser.getCurrentUser().getList("isFollowing") == null) {
List<String> emptyList = new ArrayList<String>();
ParseUser.getCurrentUser().put("isFollowing", emptyList);
}
上面代码中的问题是它只在我第一次运行应用程序时返回 null,即使我再次将其设为 null。
这个问题在我的代码中无处不在,getCurrentUser
方法从不返回最新信息...
我认为问题在于 getCurrentUser
方法返回数据的缓存版本。如何更新?
我正在使用 parse 1.13.0
和 bolts tasks 1.3.0
。
编辑:现在我知道当我使用 ParseUser.getCurrentUser().saveInBackground();
这有帮助吗?
编辑 2:问题似乎出在以下代码中的 saveInBackground()
方法中:
ParseUser.getCurrentUser().getList("isFollowing").add(users.get(
ParseUser.getCurrentUser().saveInBackground();
我第一次通过保存时运行良好,但第二次和其余的什么都不做......
我知道我现在很烦人,但我已经被这个问题困扰了大约 5 天......
请帮忙!
最佳答案
这是刷新当前用户的方式:
ParseUser.getCurrentUser().fetchInBackground(new GetCallback<ParseObject>() {
@Override
public void done(ParseObject object, ParseException e) {
}
});
关于java - 解析 getCurrentUser 信息未更新,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37837954/
FirebaseUser currentFirebaseUser = FirebaseAuth.getInstance().getCurrentUser(); currentFirebaseUser.
我有一个 .net 后端 Azure 移动服务。我一直在尝试从 Android 客户端获取当前用户信息。我正在使用以下代码 private void authenticate() { Logi
嘿对不起,如果这是一个愚蠢的问题,但这真的让我很生气。 if (ParseUser.getCurrentUser().getList("isFollowing") == null) {
所以我正在尝试为我制作的安卓游戏实现排行榜。我想在玩游戏后将高分存储在我的用户对象中,但是当我使用 put 方法时,它似乎没有在 Parse 上更新我的用户对象。 ParseUser user = P
我有一个 DispatchActivity 作为我的 Launcher Activity,用于检查当前是否有用户登录。如果用户已登录,我将他们发送到他们的 ProfileActivity。否则,我将它
.getCurrentUser() 在我重新启动应用程序时不会返回非空值,因此我停留在 MainActivity 而不是转移到 LogIn.class。这意味着我相应地不断登录 firebase 我已
我可以很好地登录用户,并显示用户名。 get("username"); echo $currentUser; ?> second page 但是当我将用户导航到同一服务器上的另一个页面并检查当前用户时
您好,感谢您抽出时间。 我一直在使用 Firebase 开发 Android 应用。 我已设置 Firebase 身份验证,用户可以使用电子邮件和密码进行注册,并在电子邮件验证后登录。 当应用程序打开
我正在为我的应用程序创建 Facebook 身份验证,一切正常,除了当我退出 Facebook 时,它仍然会将我转到应用程序的主菜单。我认为这意味着即使我注销了 .getCurrentUser() 也
Firebase 昨天工作得很好,但今天早上我打开我的项目时发现 FirebaseAuth 类现在没有任何对 FirebaseUser 类的引用。我找不到 getCurrentUser() 方法。 G
我已经使用 Java 中的 Google OAuth API 实现了 3-legged OAuth。 我的应用程序已在 GAE 上注册。而且,我也成功获得了访问 token 。但是,现在当我创建 Us
当我的 Android 应用程序启动时,我会检查用户是否已登录并继续。后来我希望这一行总是返回用户对象: FirebaseAuth.getInstance().getCurrentUser() 这通常
我是 Parse.com 的新手,目前正在 Android 中使用 Parse 构建我的第一个项目。我正在尝试复制“Anywall”教程 (https://www.parse.com/tutorial
我有一个带有登录屏幕的应用程序。现在,我只想获取在另一个 Activity 中登录的用户的 DisplayName。我怎样才能得到这个名字? 最佳答案 使用getCurrentUser(): Fire
当我使用我的 google 帐户登录并使用 getDisplayName() 获取名称时,我的名称正确显示,但在 AuthStateListener 中显示不正确。 这里是我的部分代码: privat
我为当前用户收集字符串的代码如下所示。 package timetracker2 import grails.timesecurity.* import timetracker2.TimeContro
我是一名学生,正在使用 Firebase 开发 Android 应用。我一直在尝试设置 Firebase 身份验证,但我不断收到 null ptr 异常的错误。 用户被放入 LoginActivity
我正在开发一个需要访问帐户中所有用户的应用程序。所有操作均使用管理帐户在 Google Apps for Business 帐户上完成。 总体思路是在没有任何登录屏幕/URL 的情况下从仪表板访问我的
我正在尝试设置联合身份以获得身份凭据。但是当我尝试执行 getCurrentUser() 时,得到的响应为空。另一件事是,我在后端尝试这个。那么它在后台可以工作吗?为什么在尝试 getCurrentU
我正在尝试在身份验证后立即更新用户的属性。 身份验证工作正常,我可以用它检索用户属性。 但问题是var cognitoUser = getUserPool().getCurrentUser();返回空
我是一名优秀的程序员,十分优秀!