刚接触Bmob,想实现用户登录后修改密码的功能,但是一直报空指针,为什么BmobUser.getCurrentUser().getObjectId()获取不到objectId呢?
u1.update(BmobUser.getCurrentUser().getObjectId().toString(), new UpdateListener() {
@Override
public void done(BmobException arg0) {
// TODO Auto-generated method stub
if (arg0==null) {
Toast.makeText(UpdatePWActivity.this, "修改成功", Toast.LENGTH_SHORT).show();
finish();
}else {
Toast.makeText(UpdatePWActivity.this, "修改失败", Toast.LENGTH_SHORT).show();
}
}
});
}else {
new AlertDialog.Builder(UpdatePWActivity.this).setTitle("错误")
.setMessage("俩次密码不一致").setPositiveButton("确定", null).show();
}