public void login() { AGConnectAuth auth = AGConnectAuth.getInstance(); auth.signInAnonymously().addOnSuccessListener(new HuaweiOnsuccessListener <SignInResult> ((signresult) => { TestTip.Inst.ShowText("sign in successfully." + signresult.getUser().getUid()); })).addOnFailureListener(new HuaweiOnFailureListener((e) => { TestTip.Inst.ShowText("sign in failed"); })); }