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

30 行
1003 B

using UnityEngine;
using System.Collections.Generic;
namespace HuaweiService
{
public class Activity_Data : IHmsBaseClass{
public string name => "android.app.Activity";
}
public class Activity :HmsClass<Activity_Data>
{
public const int DEFAULT_KEYS_DIALER = 1;
public const int DEFAULT_KEYS_DISABLE = 0;
public const int DEFAULT_KEYS_SEARCH_GLOBAL = 4;
public const int DEFAULT_KEYS_SEARCH_LOCAL = 3;
public const int DEFAULT_KEYS_SHORTCUT = 2;
public const int RESULT_CANCELED = 0;
public const int RESULT_FIRST_USER = 1;
public const int RESULT_OK = -1;
public Activity (): base() { }
public Intent getIntent() {
return Call<Intent>("getIntent");
}
public void startActivity(Intent arg0, Bundle arg1) {
Call("startActivity", arg0, arg1);
}
public void startActivity(Intent arg0) {
Call("startActivity", arg0);
}
}
}