浏览代码

update packages

/v2
siyao 3 年前
当前提交
7a0e1bab
共有 31 个文件被更改,包括 537 次插入49 次删除
  1. 9
      Assets/HuaweiService/Auth/AGCAuthException.cs
  2. 29
      Assets/HuaweiService/Auth/AGConnectAuth.cs
  3. 15
      Assets/HuaweiService/Auth/AGConnectUser.cs
  4. 4
      Assets/HuaweiService/apm/APMS.cs
  5. 4
      Assets/HuaweiService/apm/GameAPM.cs
  6. 4
      Assets/HuaweiService/apm/GameAttribute.cs
  7. 7
      Assets/HuaweiService/app_linking/AGConnectAppLinking.cs
  8. 80
      Assets/HuaweiService/app_linking/AppLinking.cs
  9. 18
      Assets/HuaweiService/app_linking/ResolvedLinkData.cs
  10. 16
      Assets/HuaweiService/cloud_storage/AGCStorageManagement.cs
  11. 9
      Assets/HuaweiService/cloud_storage/StorageException.cs
  12. 9
      Assets/HuaweiService/crash/AGConnectCrash.cs
  13. 16
      Assets/HuaweiServiceDemo/Scripts/test/ads/AdsTest.cs
  14. 3
      Assets/HuaweiServiceDemo/Scripts/test/apm/EnableGamePluginButton.cs
  15. 8
      Assets/HuaweiServiceDemo/Scripts/test/apm/GameApmTest.cs
  16. 2
      Assets/Plugins/Android/baseProjectTemplate.gradle
  17. 11
      Assets/Plugins/Android/launcherTemplate.gradle
  18. 10
      Assets/Plugins/Android/mainTemplate.gradle
  19. 6
      Assets/Plugins/Android/mainTemplate.gradle.2018
  20. 30
      Assets/HuaweiService/Auth/AuthApi.cs
  21. 34
      Assets/HuaweiService/Auth/AuthLoginListener.cs
  22. 16
      Assets/HuaweiService/app_linking/ReferrerProvider.cs
  23. 26
      Assets/HuaweiService/base/AGCRoutePolicy.cs
  24. 34
      Assets/HuaweiService/base/AGConnectInstance.cs
  25. 43
      Assets/HuaweiService/base/AGConnectOptions.cs
  26. 64
      Assets/HuaweiService/base/AGConnectOptionsBuilder.cs
  27. 16
      Assets/HuaweiService/base/CustomAuthProvider.cs
  28. 16
      Assets/HuaweiService/base/CustomCredentialsProvider.cs
  29. 25
      Assets/HuaweiService/credential/AGCInstanceID.cs
  30. 22
      Assets/HuaweiService/credential/AccessNetworkManager.cs

9
Assets/HuaweiService/Auth/AGCAuthException.cs


using UnityEngine;
using System.Collections.Generic;
using HuaweiService;
namespace HuaweiService.Auth
{

public const int ALREADY_SIGN_IN_USER = 5;
public const int EMAIL_VERIFICATION_IS_EMPTY = 6;
public const int PHONE_VERIFICATION_IS_EMPTY = 7;
public const int GET_ACCESS_TOKEN_ERROR = 8;
public const int USER_CANCEL = 100;
public const int AUTH_MODE_NOT_SUPPORTED = 101;
public const int GET_MAIN_ACTIVITY_ERROR = 102;
public const int INIT_GOOGLE_CLIENT_ERROR = 103;
public const int GOOGLE_ACCOUNT_IDTOKEN_ERROR = 104;
public const int FACEBOOK_ACCOUNT_TOKEN_ERROR = 105;
public const int INVALID_EMAIL = 203817223;
public const int INVALID_PHONE = 203817224;
public const int GET_UID_ERROR = 203817728;

public const int PASSWORD_IS_EMPTY = 203818068;
public const int PASSWORD_TOO_LONG = 203818071;
public const int SENSITIVE_OPERATION_TIMEOUT = 203818081;
public const int SENSITIVE_OPERATION_NEED_REAUTHENTICATE = 203818081;
public const int ACCOUNT_HAVE_BEEN_REGISTERED = 203818082;
public const int UPDATE_ACCOUNT_ERROR = 203818084;
public const int USER_NOT_REGISTERED = 203818087;

29
Assets/HuaweiService/Auth/AGConnectAuth.cs


using System;
using HuaweiService;
namespace HuaweiService.Auth
{

public class AGConnectAuth :HmsClass<AGConnectAuth_Data>
{
public AGConnectAuth (): base() { }
public static AGConnectAuth getInstance(AGConnectInstance arg0) {
return CallStatic<AGConnectAuth>("getInstance", arg0);
}
}
public Task signIn(Activity arg0, int arg1) {
return Call<Task>("signIn", arg0, arg1);
}
public Task signIn(AGConnectAuthCredential arg0) {
return Call<Task>("signIn", arg0);

}
public void deleteUser() {
Call("deleteUser");
public Task deleteUser() {
return Call<Task>("deleteUser");
}
public void signOut() {
Call("signOut");

public Task createUser(PhoneUser arg0) {
return Call<Task>("createUser", arg0);
}
public Task resetPassword(string arg0, string arg1, string arg2)
{
public Task resetPassword(string arg0, string arg1, string arg2) {
public Task resetPassword(string arg0, string arg1, string arg2, string arg3)
{
public Task resetPassword(string arg0, string arg1, string arg2, string arg3) {
}
public List getSupportedAuthList() {
return Call<List>("getSupportedAuthList");
}
public Task requestVerifyCode(string arg0, VerifyCodeSettings arg1) {
return Call<Task>("requestVerifyCode", arg0, arg1);
}
public Task requestVerifyCode(string arg0, string arg1, VerifyCodeSettings arg2) {
return Call<Task>("requestVerifyCode", arg0, arg1, arg2);
}
}
}

15
Assets/HuaweiService/Auth/AGConnectUser.cs


using System;
using HuaweiService;
namespace HuaweiService.Auth
{

public string getProviderId() {
return Call<string>("getProviderId");
}
public Task getToken(bool var1)
{
return Call<Task>("getToken", var1);
public Task getToken(bool arg0) {
return Call<Task>("getToken", arg0);
}
public Task link(Activity arg0, int arg1) {
return Call<Task>("link", arg0, arg1);
}
public Task link(AGConnectAuthCredential arg0) {
return Call<Task>("link", arg0);

}
public Task getUserExtra() {
return Call<Task>("getUserExtra");
}
public Task reauthenticate(AGConnectAuthCredential arg0) {
return Call<Task>("reauthenticate", arg0);
}
}
}

4
Assets/HuaweiService/apm/APMS.cs


public void setCurrentGameAttribute(GameAttribute arg0) {
GameAPM.getInstance().setCurrentGameAttribute(arg0);
}
public void setReportRate(int arg0) {
GameAPM.getInstance().setReportRate(arg0);
public void setReportMinRate(int arg0) {
GameAPM.getInstance().setReportMinRate(arg0);
}
public void enableGamePlugin(bool arg0) {
GameAPM.getInstance().enableGamePlugin(arg0);

4
Assets/HuaweiService/apm/GameAPM.cs


public void setCurrentGameAttribute(GameAttribute arg0) {
Call("setCurrentGameAttribute", arg0);
}
public void setReportRate(int arg0) {
Call("setReportRate", arg0);
public void setReportMinRate(int arg0) {
Call("setReportMinRate", arg0);
}
public void enableGamePlugin(bool arg0) {
Call("enableGamePlugin", arg0);

4
Assets/HuaweiService/apm/GameAttribute.cs


}
public class LoadingState :HmsClass<LoadingState_Data>
{
public static LoadingState NOT_LOADING => HmsUtil.GetStaticValue<LoadingState>("NOT_LOADING");
public static LoadingState LOADED => HmsUtil.GetStaticValue<LoadingState>("LOADED");
public LoadingState (string arg0, int arg1, int arg2): base(arg0, arg1, arg2) { }
public LoadingState (): base() { }

7
Assets/HuaweiService/app_linking/AGConnectAppLinking.cs


public static AGConnectAppLinking getInstance() {
return CallStatic<AGConnectAppLinking>("getInstance");
}
public Task getAppLinking(Activity arg0, Intent arg1) {
public Task getAppLinking(Activity arg0, Uri arg1) {
public Task getAppLinking(Activity arg0, Uri arg1) {
public Task getAppLinking(Activity arg0, Intent arg1) {
}
public void setCustomReferrer(ReferrerProvider arg0) {
Call("setCustomReferrer", arg0);
}
}
}

80
Assets/HuaweiService/app_linking/AppLinking.cs


}
}
public class ITunesConnectCampaignInfo_Data : IHmsBaseClass{
public string name => "com.huawei.agconnect.applinking.AppLinking$ITunesConnectCampaignInfo";
}
public class ITunesConnectCampaignInfo :HmsClass<ITunesConnectCampaignInfo_Data>
{
public ITunesConnectCampaignInfo (): base() { }
public static Builder newBuilder() {
return CallStatic<Builder>("newBuilder");
}
public class Builder_Data : IHmsBaseClass{
public string name => "com.huawei.agconnect.applinking.AppLinking$ITunesConnectCampaignInfo$Builder";
}
public class Builder :HmsClass<Builder_Data>
{
public Builder (): base() { }
public Builder setMediaType(string arg0) {
return Call<Builder>("setMediaType", arg0);
}
public Builder setAffiliateToken(string arg0) {
return Call<Builder>("setAffiliateToken", arg0);
}
public Builder setProviderToken(string arg0) {
return Call<Builder>("setProviderToken", arg0);
}
public Builder setCampaignToken(string arg0) {
return Call<Builder>("setCampaignToken", arg0);
}
public ITunesConnectCampaignInfo build() {
return Call<ITunesConnectCampaignInfo>("build");
}
}
}
public class IOSLinkInfo_Data : IHmsBaseClass{
public string name => "com.huawei.agconnect.applinking.AppLinking$IOSLinkInfo";
}
public class IOSLinkInfo :HmsClass<IOSLinkInfo_Data>
{
public IOSLinkInfo (): base() { }
public static Builder newBuilder() {
return CallStatic<Builder>("newBuilder");
}
public class Builder_Data : IHmsBaseClass{
public string name => "com.huawei.agconnect.applinking.AppLinking$IOSLinkInfo$Builder";
}
public class Builder :HmsClass<Builder_Data>
{
public Builder (): base() { }
public Builder setIOSDeepLink(string arg0) {
return Call<Builder>("setIOSDeepLink", arg0);
}
public Builder setBundleId(string arg0) {
return Call<Builder>("setBundleId", arg0);
}
public Builder setFallbackUrl(string arg0) {
return Call<Builder>("setFallbackUrl", arg0);
}
public Builder setIPadBundleId(string arg0) {
return Call<Builder>("setIPadBundleId", arg0);
}
public Builder setIPadFallbackUrl(string arg0) {
return Call<Builder>("setIPadFallbackUrl", arg0);
}
public Builder setITunesConnectCampaignInfo(ITunesConnectCampaignInfo arg0) {
return Call<Builder>("setITunesConnectCampaignInfo", arg0);
}
public IOSLinkInfo build() {
return Call<IOSLinkInfo>("build");
}
}
}
public class Builder_Data : IHmsBaseClass{
public string name => "com.huawei.agconnect.applinking.AppLinking$Builder";
}

}
public Builder setPreviewType(LinkingPreviewType arg0) {
return Call<Builder>("setPreviewType", arg0);
}
public Builder setIOSLinkInfo(IOSLinkInfo arg0) {
return Call<Builder>("setIOSLinkInfo", arg0);
}
public Builder setIsShowPreview(bool arg0) {
return Call<Builder>("setIsShowPreview", arg0);
}
}

18
Assets/HuaweiService/app_linking/ResolvedLinkData.cs


public string getCampaignSource() {
return Call<string>("getCampaignSource");
}
public LinkType getLinkType() {
return Call<LinkType>("getLinkType");
}
public string getInstallSource() {
return Call<string>("getInstallSource");
}
public class LinkType_Data : IHmsBaseClass{
public string name => "com.huawei.agconnect.applinking.ResolvedLinkData$LinkType";
}
public class LinkType :HmsClass<LinkType_Data>
{
public static LinkType AppLinking => HmsUtil.GetStaticValue<LinkType>("AppLinking");
public static LinkType UnifiedLinking => HmsUtil.GetStaticValue<LinkType>("UnifiedLinking");
public LinkType (): base() { }
}
}
}

16
Assets/HuaweiService/cloud_storage/AGCStorageManagement.cs


public static AGCStorageManagement getInstance(string arg0, HttpURLConnectionFactory arg1) {
return CallStatic<AGCStorageManagement>("getInstance", arg0, arg1);
}
public static AGCStorageManagement getInstance(AGConnectInstance arg0, string arg1) {
return CallStatic<AGCStorageManagement>("getInstance", arg0, arg1);
}
public StorageReference getStorageReference() {
return Call<StorageReference>("getStorageReference");
public static AGCStorageManagement getInstance(AGConnectInstance arg0, string arg1, HttpURLConnectionFactory arg2) {
return CallStatic<AGCStorageManagement>("getInstance", arg0, arg1, arg2);
}
public StorageReference getStorageReference() {
return Call<StorageReference>("getStorageReference");
}
public string getArea() {
return Call<string>("getArea");
}
public StorageReference getReferenceFromUrl(AGConnectInstance arg0, string arg1) {
return Call<StorageReference>("getReferenceFromUrl", arg0, arg1);
}
public StorageReference getReferenceFromUrl(string arg0) {
return Call<StorageReference>("getReferenceFromUrl", arg0);

9
Assets/HuaweiService/cloud_storage/StorageException.cs


public const int ERROR_NETWORK_UNAVAILABLE = 11015;
public const int ERROR_RANGE_UNSATISFIABLE = 11016;
public StorageException (): base() { }
public static StorageException fromErrorAndRequestId(int arg0, string arg1) {
return CallStatic<StorageException>("fromErrorAndRequestId", arg0, arg1);
}
public static StorageException fromHttpCodeAndRequestId(Throwable arg0, int arg1, int arg2, string arg3) {
return CallStatic<StorageException>("fromHttpCodeAndRequestId", arg0, arg1, arg2, arg3);
}
public static StorageException fromHttpCodeAndRequestId(int arg0, int arg1, string arg2) {
return CallStatic<StorageException>("fromHttpCodeAndRequestId", arg0, arg1, arg2);
}
public static StorageException fromErrorStatus(int arg0) {
return CallStatic<StorageException>("fromErrorStatus", arg0);
}

9
Assets/HuaweiService/crash/AGConnectCrash.cs


public void setUserId(string arg0) {
Call("setUserId", arg0);
}
public void setCustomKey(string arg0, bool arg1) {
Call("setCustomKey", arg0, arg1);
}
public void setCustomKey(string arg0, long arg1) {
Call("setCustomKey", arg0, arg1);
}

public void setCustomKey(string arg0, string arg1) {
Call("setCustomKey", arg0, arg1);
}
public void setCustomKey(string arg0, bool arg1) {
Call("setCustomKey", arg0, arg1);
}
public void setCustomKey(string arg0, double arg1) {

}
public void log(string arg0) {
Call("log", arg0);
}
public void recordException(Throwable arg0) {
Call("recordException", arg0);
}
}
}

16
Assets/HuaweiServiceDemo/Scripts/test/ads/AdsTest.cs


using UnityEngine;
using HuaweiService;
using HuaweiService.ads;
using UnityEngine.Diagnostics;
namespace HuaweiServiceDemo
{

registerEvent("test policy ",TestPolicy);
registerEvent("load image ads " + Screen.width,LoadImageAds);
registerEvent("load video ads " + Screen.height,LoadVideoAds);
registerEvent("load reward ads",LoadRewardAds);

registerEvent("set RequestOptions NonPersonalizedAd",setRequestOptionsNonPersonalizedAd);
}
public void TestPolicy()
{
var instance = AGConnectInstance.getInstance();
TestTip.Inst.ShowText($"instance");
var option = instance.getOptions();
TestTip.Inst.ShowText($"option");
var policy = option.getRoutePolicy();
TestTip.Inst.ShowText($"policy {policy.getRouteName()}");
TestTip.Inst.ShowText($"{AGCRoutePolicy.CHINA.getRouteName()}");
TestTip.Inst.ShowText($"{AGCRoutePolicy.RUSSIA.getRouteName()}");
}
public void LoadImageAds()
{
InterstitialAd ad = new InterstitialAd(new Context());

3
Assets/HuaweiServiceDemo/Scripts/test/apm/EnableGamePluginButton.cs


void switchStatus()
{
m_test.switchGamePluginStatus(m_gamePluginStatus);
Text text = this.GetComponentInChildren<Text>();
m_test.switchGamePluginStatus(m_gamePluginStatus, text);
m_gamePluginStatus = !m_gamePluginStatus;
}
}

8
Assets/HuaweiServiceDemo/Scripts/test/apm/GameApmTest.cs


gameApmTest_count++;
text.text = "gameApmTest start, count: " + gameApmTest_count + "\n";
GameAttribute attribute = new GameAttribute("new scene", GameAttribute.LoadingState.NOT_LOADING);
GameAttribute attribute = new GameAttribute("newscene", GameAttribute.LoadingState.LOADING);
text.text += "create new attribute success\n";
APMS.getInstance().startGamePlugin();

APMS.getInstance().setCurrentGameAttribute(attribute);
text.text +="setCurrentGameAttribute\n";
APMS.getInstance().setReportRate(1);
APMS.getInstance().setReportMinRate(1);
text.text += "setReportRate\n";
text.text += "gameApmTest success\n\n";

text.text += "stopLoadingSceneTest success\n";
}
public void switchGamePluginStatus(bool status)
public void switchGamePluginStatus(bool status, Text text)
text.text = "enableCollection status: true";
text.text = "enableCollection status: false";
}
}

2
Assets/Plugins/Android/baseProjectTemplate.gradle


// See official Gradle and Android Gradle Plugin compatibility table here https://developer.android.com/studio/releases/gradle-plugin#updating-gradle
// To specify a custom Gradle version in Unity, go do "Preferences > External Tools", uncheck "Gradle Installed with Unity (recommended)" and specify a path to a custom Gradle version
classpath 'com.android.tools.build:gradle:3.4.0'
classpath 'com.huawei.agconnect:agcp:1.4.2.300'
classpath 'com.huawei.agconnect:agcp:1.6.1.300'
classpath 'com.huawei.agconnect:agconnect-apms-plugin:1.5.2.300'
**BUILD_SCRIPT_DEPS**
}

11
Assets/Plugins/Android/launcherTemplate.gradle


dependencies {
implementation project(':unityLibrary')
implementation 'com.huawei.agconnect:agconnect-apms:1.5.2.300'
implementation 'com.huawei.agconnect:agconnect-apms-game:1.5.2.300'
implementation "com.huawei.agconnect:agconnect-storage:1.3.1.100"
implementation "com.huawei.agconnect:agconnect-storage:1.3.1.200"
implementation 'com.huawei.agconnect:agconnect-apms-game:1.5.2.303'
implementation 'com.huawei.agconnect:agconnect-applinking:1.4.1.300'
implementation 'com.huawei.agconnect:agconnect-credential:1.6.1.300'
implementation 'com.huawei.agconnect:agconnect-applinking:1.6.1.300'
implementation 'com.huawei.agconnect:agconnect-remoteconfig:1.4.1.300'
implementation 'com.huawei.hms:ads-lite:13.4.29.303'
implementation 'com.huawei.hms:ads-consent:3.4.30.301'

implementation 'com.huawei.hms:hianalytics:5.1.0.300'
implementation 'com.huawei.agconnect:agconnect-crash:1.4.1.300'
implementation 'com.huawei.agconnect:agconnect-core:1.4.1.300'
implementation 'com.huawei.agconnect:agconnect-crash:1.4.2.300'
implementation 'com.huawei.agconnect:agconnect-core:1.6.1.300'
implementation 'com.huawei.agconnect:agconnect-function:1.4.2.300'
implementation 'com.huawei.hms:base:5.0.5.300'
implementation 'com.huawei.hms:game:5.0.4.302'

10
Assets/Plugins/Android/mainTemplate.gradle


//cloud storage
implementation "com.huawei.agconnect:agconnect-storage:1.3.1.100"
implementation "com.huawei.agconnect:agconnect-storage:1.3.1.200"
implementation 'com.huawei.agconnect:agconnect-apms-game:1.5.2.300'
implementation 'com.huawei.agconnect:agconnect-apms-game:1.5.2.303'
//hms
implementation 'com.huawei.hms:base:5.0.5.300'

implementation 'com.huawei.agconnect:agconnect-crash:1.4.1.300'
implementation 'com.huawei.agconnect:agconnect-crash:1.4.2.300'
implementation 'com.huawei.agconnect:agconnect-core:1.4.1.300'
implementation 'com.huawei.agconnect:agconnect-auth:1.4.1.300'
implementation 'com.huawei.agconnect:agconnect-core:1.6.1.300'
implementation 'com.huawei.agconnect:agconnect-auth:1.6.1.300'
//cloudfunction
implementation "com.huawei.agconnect:agconnect-function:1.4.2.300"
implementation 'com.fasterxml.jackson.core:jackson-databind:2.8.5'

6
Assets/Plugins/Android/mainTemplate.gradle.2018


dependencies {
classpath 'com.android.tools.build:gradle:3.4.0'
classpath 'com.huawei.agconnect:agcp:1.4.1.300'
classpath 'com.huawei.agconnect:agcp:1.6.1.300'
**BUILD_SCRIPT_DEPS**
}
}

implementation project(':unityLibrary')
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.huawei.hms:hianalytics:5.1.0.300'
implementation 'com.huawei.agconnect:agconnect-crash:1.4.1.300'
implementation 'com.huawei.agconnect:agconnect-core:1.4.1.300'
implementation 'com.huawei.agconnect:agconnect-crash:1.4.2.300'
implementation 'com.huawei.agconnect:agconnect-core:1.6.1.300'
implementation "com.huawei.agconnect:agconnect-function:1.4.2.300"
implementation 'com.fasterxml.jackson.core:jackson-databind:2.8.5'
implementation 'com.fasterxml.jackson.core:jackson-core:2.8.5'

30
Assets/HuaweiService/Auth/AuthApi.cs


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");
}
}
}

34
Assets/HuaweiService/Auth/AuthLoginListener.cs


using UnityEngine;
using System.Collections.Generic;
namespace HuaweiService.Auth
{
public class AuthLoginListenerData : IHmsBaseListener
{
public string name => "com.huawei.agconnect.auth.api.AuthLoginListener";
public string buildName => "";
}
public class AuthLoginListener : HmsListener<AuthLoginListenerData>
{
public virtual void loginSuccess(AGConnectAuthCredential arg0) {
Call("loginSuccess", arg0);
}
public void loginSuccess(AndroidJavaObject arg0){
loginSuccess(HmsUtil.GetHmsBase<AGConnectAuthCredential>(arg0));
}
public virtual void loginCancel() {
Call("loginCancel");
}
public virtual void loginFailure(Exception arg0) {
Call("loginFailure", arg0);
}
public void loginFailure(AndroidJavaObject arg0){
loginFailure(HmsUtil.GetHmsBase<Exception>(arg0));
}
}
}

16
Assets/HuaweiService/app_linking/ReferrerProvider.cs


using UnityEngine;
using System.Collections.Generic;
namespace HuaweiService.AppLinking
{
public class ReferrerProvider_Data : IHmsBaseClass{
public string name => "com.huawei.agconnect.applinking.ReferrerProvider";
}
public class ReferrerProvider :HmsClass<ReferrerProvider_Data>
{
public ReferrerProvider (): base() { }
public Task getCustomReferrer() {
return Call<Task>("getCustomReferrer");
}
}
}

26
Assets/HuaweiService/base/AGCRoutePolicy.cs


using UnityEngine;
using System.Collections.Generic;
namespace HuaweiService
{
public class AGCRoutePolicy_Data : IHmsBaseClass{
public string name => "com.huawei.agconnect.AGCRoutePolicy";
}
public class AGCRoutePolicy :HmsClass<AGCRoutePolicy_Data>
{
public static AGCRoutePolicy UNKNOWN => HmsUtil.GetStaticValue<AGCRoutePolicy>("UNKNOWN");
public static AGCRoutePolicy CHINA => HmsUtil.GetStaticValue<AGCRoutePolicy>("CHINA");
public static AGCRoutePolicy GERMANY => HmsUtil.GetStaticValue<AGCRoutePolicy>("GERMANY");
public static AGCRoutePolicy RUSSIA => HmsUtil.GetStaticValue<AGCRoutePolicy>("RUSSIA");
public static AGCRoutePolicy SINGAPORE => HmsUtil.GetStaticValue<AGCRoutePolicy>("SINGAPORE");
public AGCRoutePolicy (): base() { }
public string getRouteName() {
return Call<string>("getRouteName");
}
}
}

34
Assets/HuaweiService/base/AGConnectInstance.cs


using UnityEngine;
using System.Collections.Generic;
namespace HuaweiService
{
public class AGConnectInstance_Data : IHmsBaseClass{
public string name => "com.huawei.agconnect.AGConnectInstance";
}
public class AGConnectInstance :HmsClass<AGConnectInstance_Data>
{
public AGConnectInstance (): base() { }
public static void initialize(Context arg0, AGConnectOptionsBuilder arg1) {
CallStatic("initialize", arg0, arg1);
}
public static void initialize(Context arg0) {
CallStatic("initialize", arg0);
}
public static AGConnectInstance buildInstance(AGConnectOptions arg0) {
return CallStatic<AGConnectInstance>("buildInstance", arg0);
}
public static AGConnectInstance getInstance(string arg0) {
return CallStatic<AGConnectInstance>("getInstance", arg0);
}
public static AGConnectInstance getInstance() {
return CallStatic<AGConnectInstance>("getInstance");
}
public AGConnectOptions getOptions() {
return Call<AGConnectOptions>("getOptions");
}
public string getIdentifier() {
return Call<string>("getIdentifier");
}
}
}

43
Assets/HuaweiService/base/AGConnectOptions.cs


using UnityEngine;
using System.Collections.Generic;
namespace HuaweiService
{
public class AGConnectOptions_Data : IHmsBaseClass{
public string name => "com.huawei.agconnect.AGConnectOptions";
}
public class AGConnectOptions :HmsClass<AGConnectOptions_Data>
{
public AGConnectOptions (): base() { }
public string getIdentifier() {
return Call<string>("getIdentifier");
}
public Context getContext() {
return Call<Context>("getContext");
}
public AGCRoutePolicy getRoutePolicy() {
return Call<AGCRoutePolicy>("getRoutePolicy");
}
public string getPackageName() {
return Call<string>("getPackageName");
}
public bool getBoolean(string arg0, bool arg1) {
return Call<bool>("getBoolean", arg0, arg1);
}
public bool getBoolean(string arg0) {
return Call<bool>("getBoolean", arg0);
}
public int getInt(string arg0, int arg1) {
return Call<int>("getInt", arg0, arg1);
}
public int getInt(string arg0) {
return Call<int>("getInt", arg0);
}
public string getString(string arg0, string arg1) {
return Call<string>("getString", arg0, arg1);
}
public string getString(string arg0) {
return Call<string>("getString", arg0);
}
}
}

64
Assets/HuaweiService/base/AGConnectOptionsBuilder.cs


using UnityEngine;
using System.Collections.Generic;
namespace HuaweiService
{
public class AGConnectOptionsBuilder_Data : IHmsBaseClass{
public string name => "com.huawei.agconnect.AGConnectOptionsBuilder";
}
public class AGConnectOptionsBuilder :HmsClass<AGConnectOptionsBuilder_Data>
{
public AGConnectOptionsBuilder (): base() { }
public AGConnectOptionsBuilder setProductId(string arg0) {
return Call<AGConnectOptionsBuilder>("setProductId", arg0);
}
public AGConnectOptionsBuilder setAppId(string arg0) {
return Call<AGConnectOptionsBuilder>("setAppId", arg0);
}
public AGConnectOptionsBuilder setCPId(string arg0) {
return Call<AGConnectOptionsBuilder>("setCPId", arg0);
}
public AGConnectOptionsBuilder setClientId(string arg0) {
return Call<AGConnectOptionsBuilder>("setClientId", arg0);
}
public AGConnectOptionsBuilder setClientSecret(string arg0) {
return Call<AGConnectOptionsBuilder>("setClientSecret", arg0);
}
public AGConnectOptionsBuilder setApiKey(string arg0) {
return Call<AGConnectOptionsBuilder>("setApiKey", arg0);
}
public Map getCustomConfigMap() {
return Call<Map>("getCustomConfigMap");
}
public AGConnectOptionsBuilder setCustomValue(string arg0, string arg1) {
return Call<AGConnectOptionsBuilder>("setCustomValue", arg0, arg1);
}
public AGConnectOptionsBuilder setCustomCredentialProvider(CustomCredentialsProvider arg0) {
return Call<AGConnectOptionsBuilder>("setCustomCredentialProvider", arg0);
}
public AGConnectOptionsBuilder setCustomAuthProvider(CustomAuthProvider arg0) {
return Call<AGConnectOptionsBuilder>("setCustomAuthProvider", arg0);
}
public AGConnectOptionsBuilder setRoutePolicy(AGCRoutePolicy arg0) {
return Call<AGConnectOptionsBuilder>("setRoutePolicy", arg0);
}
public AGCRoutePolicy getRoutePolicy() {
return Call<AGCRoutePolicy>("getRoutePolicy");
}
public AGConnectOptionsBuilder setPackageName(string arg0) {
return Call<AGConnectOptionsBuilder>("setPackageName", arg0);
}
public AGConnectOptionsBuilder setInputStream(InputStream arg0) {
return Call<AGConnectOptionsBuilder>("setInputStream", arg0);
}
public InputStream getInputStream() {
return Call<InputStream>("getInputStream");
}
public AGConnectOptions build(Context arg0, string arg1) {
return Call<AGConnectOptions>("build", arg0, arg1);
}
public AGConnectOptions build(Context arg0) {
return Call<AGConnectOptions>("build", arg0);
}
}
}

16
Assets/HuaweiService/base/CustomAuthProvider.cs


using UnityEngine;
using System.Collections.Generic;
namespace HuaweiService
{
public class CustomAuthProvider_Data : IHmsBaseClass{
public string name => "com.huawei.agconnect.CustomAuthProvider";
}
public class CustomAuthProvider :HmsClass<CustomAuthProvider_Data>
{
public CustomAuthProvider (): base() { }
public Task getTokens(bool arg0) {
return Call<Task>("getTokens", arg0);
}
}
}

16
Assets/HuaweiService/base/CustomCredentialsProvider.cs


using UnityEngine;
using System.Collections.Generic;
namespace HuaweiService
{
public class CustomCredentialsProvider_Data : IHmsBaseClass{
public string name => "com.huawei.agconnect.CustomCredentialsProvider";
}
public class CustomCredentialsProvider :HmsClass<CustomCredentialsProvider_Data>
{
public CustomCredentialsProvider (): base() { }
public Task getTokens(bool arg0) {
return Call<Task>("getTokens", arg0);
}
}
}

25
Assets/HuaweiService/credential/AGCInstanceID.cs


using UnityEngine;
using System.Collections.Generic;
namespace HuaweiService.credential
{
public class AGCInstanceID_Data : IHmsBaseClass{
public string name => "com.huawei.agconnect.common.api.AGCInstanceID";
}
public class AGCInstanceID :HmsClass<AGCInstanceID_Data>
{
public AGCInstanceID (): base() { }
public static AGCInstanceID getInstance(Context arg0) {
return CallStatic<AGCInstanceID>("getInstance", arg0);
}
public string getId() {
return Call<string>("getId");
}
public long getCreationTime() {
return Call<long>("getCreationTime");
}
public void deleteAAID() {
Call("deleteAAID");
}
}
}

22
Assets/HuaweiService/credential/AccessNetworkManager.cs


using UnityEngine;
using System.Collections.Generic;
namespace HuaweiService.credential
{
public class AccessNetworkManager_Data : IHmsBaseClass{
public string name => "com.huawei.agconnect.common.network.AccessNetworkManager";
}
public class AccessNetworkManager :HmsClass<AccessNetworkManager_Data>
{
public AccessNetworkManager (): base() { }
public static AccessNetworkManager getInstance() {
return CallStatic<AccessNetworkManager>("getInstance");
}
public void addCallback(AccessNetworkCallback arg0) {
Call("addCallback", arg0);
}
public void setAccessNetwork(bool arg0) {
Call("setAccessNetwork", arg0);
}
}
}
正在加载...
取消
保存