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

47 行
1.7 KiB

using UnityEngine;
using System.Collections.Generic;
namespace HuaweiService.CloudStorage
{
public class StreamDownloadTask_Data : IHmsBaseClass{
public string name => "com.huawei.agconnect.cloud.storage.core.StreamDownloadTask";
}
public class StreamDownloadTask :HmsClass<StreamDownloadTask_Data>
{
public StreamDownloadTask (): base() { }
public class StreamHandlerData : IHmsBaseListener
{
public string name => "com.huawei.agconnect.cloud.storage.core.StreamDownloadTask$StreamHandler";
public string buildName => "";
}
public class StreamHandler : HmsListener<StreamHandlerData>
{
public virtual void readStream(StreamDownloadResult arg0, InputStream arg1) {
Call("readStream", arg0, arg1);
}
public void readStream(AndroidJavaObject arg0, AndroidJavaObject arg1){
readStream(HmsUtil.GetHmsBase<StreamDownloadResult>(arg0), HmsUtil.GetHmsBase<InputStream>(arg1));
}
}
public class StreamDownloadResult_Data : IHmsBaseClass{
public string name => "com.huawei.agconnect.cloud.storage.core.StreamDownloadTask$StreamDownloadResult";
}
public class StreamDownloadResult :HmsClass<StreamDownloadResult_Data>
{
public StreamDownloadResult (): base() { }
public long getBytesTransferred() {
return Call<long>("getBytesTransferred");
}
public long getTotalByteCount() {
return Call<long>("getTotalByteCount");
}
public InputStream getStream() {
return Call<InputStream>("getStream");
}
}
}
}