本演示项目在Unity for Android Build中启用部分华为HMS和AGC服务,对应的类和函数的名称和用法相同。
您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

30 行
921 B

using UnityEngine;
using System.Collections.Generic;
namespace HuaweiService.Auth
{
public class AuthApiData : IHmsBaseListener
{
public string name => "com.huawei.agconnect.auth.api.AuthApi";
public string buildName => "";
}
public class AuthApi : HmsListener<AuthApiData>
{
public virtual void login(Activity arg0, AGConnectInstance arg1, AuthLoginListener arg2) {
Call("login", arg0, arg1, arg2);
}
public void login(AndroidJavaObject arg0, AndroidJavaObject arg1, AndroidJavaObject arg2){
login(HmsUtil.GetHmsBase<Activity>(arg0), HmsUtil.GetHmsBase<AGConnectInstance>(arg1), HmsUtil.GetHmsBase<AuthLoginListener>(arg2));
}
public virtual void logout() {
Call("logout");
}
public virtual int providerId() {
return Call<int>("providerId");
}
}
}