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

38 行
1.2 KiB

using UnityEngine;
using System.Collections.Generic;
namespace HuaweiService.push
{
public class HmsInstanceId_Data : IHmsBaseClass{
public string name => "com.huawei.hms.aaid.HmsInstanceId";
}
public class HmsInstanceId :HmsClass<HmsInstanceId_Data>
{
public const string TAG = "HmsInstanceId";
public HmsInstanceId (): base() { }
public static HmsInstanceId getInstance(Context arg0) {
return CallStatic<HmsInstanceId>("getInstance", arg0);
}
public string getId() {
return Call<string>("getId");
}
public long getCreationTime() {
return Call<long>("getCreationTime");
}
public string getToken(string arg0, string arg1) {
return Call<string>("getToken", arg0, arg1);
}
public string getToken() {
return Call<string>("getToken");
}
public void deleteToken(string arg0, string arg1) {
Call("deleteToken", arg0, arg1);
}
public void deleteAAID() {
Call("deleteAAID");
}
public Task getAAID() {
return Call<Task>("getAAID");
}
}
}