浏览代码

update

/main
siyao 4 年前
当前提交
5796fc1c
共有 42 个文件被更改,包括 1337 次插入163 次删除
  1. 5
      .DS_Store
  2. 5
      Assets/.DS_Store
  3. 14
      Assets/HuaweiHms/src/hms/Wrapper/ads/RewardAd.cs
  4. 124
      Assets/HuaweiHms/src/hms/Wrapper/app_linking/AppLinking.cs
  5. 12
      Assets/HuaweiHms/src/hms/Wrapper/appmessage/AGConnectAppMessaging.cs
  6. 21
      Assets/HuaweiHms/src/hms/Wrapper/appmessage/AppMessage.cs
  7. 10
      Assets/HuaweiHms/src/hms/Wrapper/base/AGConnectServicesConfig.cs
  8. 6
      Assets/HuaweiHms/src/hms/Wrapper/base/Bundle.cs
  9. 6
      Assets/HuaweiHms/src/hms/Wrapper/base/Intent.cs
  10. 2
      Assets/HuaweiHms/src/hms/Wrapper/base/PersistableBundle.cs
  11. 10
      Assets/HuaweiHms/src/hms/Wrapper/base/Task.cs
  12. 5
      Assets/HuaweiHms/src/hms/Wrapper/game_service/GameService.dll.meta
  13. 2
      Assets/HuaweiHms/src/hms/Wrapper/location/ActivityConversionData.cs
  14. 2
      Assets/HuaweiHms/src/hms/Wrapper/location/ActivityConversionInfo.cs
  15. 2
      Assets/HuaweiHms/src/hms/Wrapper/location/ActivityConversionRequest.cs
  16. 2
      Assets/HuaweiHms/src/hms/Wrapper/location/ActivityConversionResponse.cs
  17. 4
      Assets/HuaweiHms/src/hms/Wrapper/location/ActivityIdentificationResponse.cs
  18. 6
      Assets/HuaweiHms/src/hms/Wrapper/location/FusedLocationProviderClient.cs
  19. 2
      Assets/HuaweiHms/src/hms/Wrapper/location/GeofenceService.cs
  20. 4
      Assets/HuaweiHms/src/hms/Wrapper/location/LocationServices.cs
  21. 24
      Assets/HuaweiHms/src/hms/Wrapper/location/LocationSettingsStates.cs
  22. 2
      Assets/HuaweiHms/src/hms/Wrapper/location/SettingsClient.cs
  23. 6
      Assets/HuaweiHms/src/hms/Wrapper/push/HmsInstanceId.cs
  24. 78
      Assets/HuaweiHms/src/hms/Wrapper/push/RemoteMessage.cs
  25. 6
      Assets/HuaweiHms/src/hms/Wrapper/remote_config/AGConnectConfig.cs
  26. 4
      Assets/HuaweiHmsDemo/Scripts/test/location/GetLocationAvailabilityTest.cs
  27. 2
      Assets/HuaweiHmsDemo/Scripts/test/location/GetLocationTest.cs
  28. 2
      Assets/HuaweiHmsDemo/Scripts/test/location/LocationListener.cs
  29. 37
      Assets/HuaweiHmsDemo/Scripts/test/location/LocationUpdateTest.cs
  30. 6
      Assets/HuaweiHmsDemo/Scripts/ui/TestView.cs
  31. 6
      Assets/Plugins/Android/HmsAnalyticActivity.java
  32. 1
      Assets/HuaweiHms/.DS_Store
  33. 20
      Assets/HuaweiHms/src/hms/Wrapper/appmessage/AGConnectAppMessagingOnDisplayListener.cs
  34. 11
      Assets/HuaweiHms/src/hms/Wrapper/appmessage/AGConnectAppMessagingOnDisplayListener.cs.meta
  35. 930
      Assets/HuaweiHmsDemo/Scenes/HmsAppMessageSampleScene.unity
  36. 7
      Assets/HuaweiHmsDemo/Scenes/HmsAppMessageSampleScene.unity.meta
  37. 8
      Assets/HuaweiHmsDemo/Scripts/test/appmessage.meta
  38. 31
      Assets/HuaweiHmsDemo/Scripts/test/appmessage/AppMessageListener.cs
  39. 11
      Assets/HuaweiHmsDemo/Scripts/test/appmessage/AppMessageListener.cs.meta
  40. 61
      Assets/HuaweiHmsDemo/Scripts/test/appmessage/AppMessageTest.cs
  41. 3
      Assets/HuaweiHmsDemo/Scripts/test/appmessage/AppMessageTest.cs.meta

5
.DS_Store
文件差异内容过多而无法显示
查看文件

5
Assets/.DS_Store


Bud1 eiHmslg  @� @� @� @ HuaweiHmslg1Scomp�J HuaweiHmsmoDDblob�%"����A HuaweiHmsmodDblob�%"����A HuaweiHmsph1Scomp HuaweiHmsDemobwspblob�bplist00�
 ]ShowStatusBar_SidebarWidthTenElevenOrLater[ShowToolbar[ShowTabView_ContainerShowSidebar\WindowBounds[ShowSidebar[ShowPathbar#@a�  _{{355, 310}, {770, 436}} 'FR^u����������� HuaweiHmsDemolg1Scomp�t HuaweiHmsDemomoDDblobH��Q���A HuaweiHmsDemomodDblobH��Q���A HuaweiHmsDemoph1Scomp
� HuaweiHmsDemovSrnlongPluginsbwspblob�bplist00�  ]ShowStatusBar[ShowPathbar[ShowToolbar[ShowTabView_ContainerShowSidebar\WindowBounds[ShowSidebar  _{{36, 330}, {1008, 436}} %1=I`myz{|}~��Pluginslg1ScompA�PluginsmoDDblob�†��APluginsmodDblob�†��APluginsph1Scomp�PluginsvSrnlong @� @� @ E DSDB `� @� @� @
Bud1 eiHmsds  @� @� @� @ HuaweiHmsdsclbool HuaweiHmslg1Scomp�C HuaweiHmsmoDDblobN�n~5��A HuaweiHmsmodDblobN�n~5��A HuaweiHmsph1Scomp� HuaweiHmsDemobwspblob�bplist00�
 ]ShowStatusBar_SidebarWidthTenElevenOrLater[ShowToolbar[ShowTabView_ContainerShowSidebar\WindowBounds[ShowSidebar[ShowPathbar#@a�  _{{355, 310}, {770, 436}} 'FR^u����������� HuaweiHmsDemodsclbool HuaweiHmsDemolg1Scomp�3 HuaweiHmsDemomoDDblobo��d���A HuaweiHmsDemomodDblobo��d���A HuaweiHmsDemoph1Scomp HuaweiHmsDemovSrnlongPluginsbwspblob�bplist00�  ]ShowStatusBar[ShowPathbar[ShowToolbar[ShowTabView_ContainerShowSidebar\WindowBounds[ShowSidebar  _{{36, 330}, {1008, 436}} %1=I`myz{|}~��Pluginslg1ScompA�PluginsmoDDblob�†��APluginsmodDblob�†��APluginsph1Scomp�PluginsvSrnlong @� @ E DSDB `� @� @� @

14
Assets/HuaweiHms/src/hms/Wrapper/ads/RewardAd.cs


public void pause(Context arg0) {
Call("pause", arg0);
}
public void resume() {
Call("resume");
}
}
public void resume() {
Call("resume");
}
public void setData(string arg0) {
Call("setData", arg0);

public void setRewardVerifyConfig(RewardVerifyConfig arg0) {
Call("setRewardVerifyConfig", arg0);
}
public void show(Activity arg0, RewardAdStatusListener arg1) {
Call("show", arg0, arg1);
public void show(Activity arg0, RewardAdStatusListener arg1, bool arg2) {
Call("show", arg0, arg1, arg2);
public void show(Activity arg0, RewardAdStatusListener arg1, bool arg2) {
Call("show", arg0, arg1, arg2);
public void show(Activity arg0, RewardAdStatusListener arg1) {
Call("show", arg0, arg1);
}
}
}

124
Assets/HuaweiHms/src/hms/Wrapper/app_linking/AppLinking.cs


return Call<Uri>("getUri");
}
public class CampaignInfo_Data : IHmsBaseClass{
public string name => "com.huawei.agconnect.applinking.AppLinking$CampaignInfo";
}
public class CampaignInfo :HmsClass<CampaignInfo_Data>
{
public CampaignInfo (): base() { }
public static Builder newBuilder() {
return CallStatic<Builder>("newBuilder");
}
public class Builder_Data : IHmsBaseClass{
public string name => "com.huawei.agconnect.applinking.AppLinking$CampaignInfo$Builder";
}
public class Builder :HmsClass<Builder_Data>
{
public Builder (): base() { }
public Builder setName(string arg0) {
return Call<Builder>("setName", arg0);
}
public Builder setSource(string arg0) {
return Call<Builder>("setSource", arg0);
}
public Builder setMedium(string arg0) {
return Call<Builder>("setMedium", arg0);
}
public CampaignInfo build() {
return Call<CampaignInfo>("build");
}
}
}
public class AndroidLinkInfo_Data : IHmsBaseClass{
public string name => "com.huawei.agconnect.applinking.AppLinking$AndroidLinkInfo";
}

}
public Builder setFallbackUrl(string arg0) {
return Call<Builder>("setFallbackUrl", arg0);
}
}
}
public class SocialCardInfo_Data : IHmsBaseClass{
public string name => "com.huawei.agconnect.applinking.AppLinking$SocialCardInfo";
}
public class SocialCardInfo :HmsClass<SocialCardInfo_Data>
{
public SocialCardInfo (): base() { }
public static Builder newBuilder() {
return CallStatic<Builder>("newBuilder");
}
public class Builder_Data : IHmsBaseClass{
public string name => "com.huawei.agconnect.applinking.AppLinking$SocialCardInfo$Builder";
}
public class Builder :HmsClass<Builder_Data>
{
public Builder (): base() { }
public Builder setTitle(string arg0) {
return Call<Builder>("setTitle", arg0);
}
public Builder setImageUrl(string arg0) {
return Call<Builder>("setImageUrl", arg0);
}
public Builder setDescription(string arg0) {
return Call<Builder>("setDescription", arg0);
}
public SocialCardInfo build() {
return Call<SocialCardInfo>("build");
}
}
}

}
public Builder setPreviewType(LinkingPreviewType arg0) {
return Call<Builder>("setPreviewType", arg0);
}
}
public class SocialCardInfo_Data : IHmsBaseClass{
public string name => "com.huawei.agconnect.applinking.AppLinking$SocialCardInfo";
}
public class SocialCardInfo :HmsClass<SocialCardInfo_Data>
{
public SocialCardInfo (): base() { }
public static Builder newBuilder() {
return CallStatic<Builder>("newBuilder");
}
public class Builder_Data : IHmsBaseClass{
public string name => "com.huawei.agconnect.applinking.AppLinking$SocialCardInfo$Builder";
}
public class Builder :HmsClass<Builder_Data>
{
public Builder (): base() { }
public Builder setTitle(string arg0) {
return Call<Builder>("setTitle", arg0);
}
public Builder setImageUrl(string arg0) {
return Call<Builder>("setImageUrl", arg0);
}
public Builder setDescription(string arg0) {
return Call<Builder>("setDescription", arg0);
}
public SocialCardInfo build() {
return Call<SocialCardInfo>("build");
}
}
}
public class CampaignInfo_Data : IHmsBaseClass{
public string name => "com.huawei.agconnect.applinking.AppLinking$CampaignInfo";
}
public class CampaignInfo :HmsClass<CampaignInfo_Data>
{
public CampaignInfo (): base() { }
public static Builder newBuilder() {
return CallStatic<Builder>("newBuilder");
}
public class Builder_Data : IHmsBaseClass{
public string name => "com.huawei.agconnect.applinking.AppLinking$CampaignInfo$Builder";
}
public class Builder :HmsClass<Builder_Data>
{
public Builder (): base() { }
public Builder setName(string arg0) {
return Call<Builder>("setName", arg0);
}
public Builder setSource(string arg0) {
return Call<Builder>("setSource", arg0);
}
public Builder setMedium(string arg0) {
return Call<Builder>("setMedium", arg0);
}
public CampaignInfo build() {
return Call<CampaignInfo>("build");
}
}
}

12
Assets/HuaweiHms/src/hms/Wrapper/appmessage/AGConnectAppMessaging.cs


public void trigger(string arg0) {
Call("trigger", arg0);
}
public static AGConnectAppMessaging getInstance() {
return CallStatic<AGConnectAppMessaging>("getInstance");
}
public void addOnClickListener(AGConnectAppMessagingOnClickListener arg0) {
Call("addOnClickListener", arg0);
}
public void addOnDisplayListener(AGConnectAppMessagingOnDisplayListener arg0) {
Call("addOnDisplayListener", arg0);
}
public void addOnDismissListener(AGConnectAppMessagingOnDismissListener arg0) {
Call("addOnDismissListener", arg0);
}
}
}

21
Assets/HuaweiHms/src/hms/Wrapper/appmessage/AppMessage.cs


public class AppMessage :HmsClass<AppMessage_Data>
{
public AppMessage (): base() { }
public long getId() {
return Call<long>("getId");
}
public long getStartTime() {
return Call<long>("getStartTime");
}
public long getEndTime() {
return Call<long>("getEndTime");
}
public int getFrequencyType() {
return Call<int>("getFrequencyType");
}
public int getFrequencyValue() {
return Call<int>("getFrequencyValue");
}
public int getTestFlag() {
return Call<int>("getTestFlag");
}
public bool isTestMessage() {
return Call<bool>("isTestMessage");
}
}
}

10
Assets/HuaweiHms/src/hms/Wrapper/base/AGConnectServicesConfig.cs


public static AGConnectServicesConfig fromContext(Context arg0) {
return CallStatic<AGConnectServicesConfig>("fromContext", arg0);
}
public bool getBoolean(string arg0, bool arg1) {
return Call<bool>("getBoolean", arg0, arg1);
}
public int getInt(string arg0, int arg1) {
return Call<int>("getInt", arg0, arg1);
public bool getBoolean(string arg0, bool arg1) {
return Call<bool>("getBoolean", arg0, arg1);
}
public int getInt(string arg0, int arg1) {
return Call<int>("getInt", arg0, arg1);
}
public string getString(string arg0, string arg1) {
return Call<string>("getString", arg0, arg1);

6
Assets/HuaweiHms/src/hms/Wrapper/base/Bundle.cs


}
public class Bundle :HmsClass<Bundle_Data>
{
public Bundle (ClassLoader arg0): base(arg0) { }
public Bundle (int arg0): base(arg0) { }
public Bundle (Bundle arg0): base(arg0) { }
public Bundle (Bundle arg0): base(arg0) { }
public Bundle (int arg0): base(arg0) { }
public Bundle (ClassLoader arg0): base(arg0) { }
public Bundle (): base() { }
public void putByte(string arg0, byte arg1) {
Call("putByte", arg0, arg1);

6
Assets/HuaweiHms/src/hms/Wrapper/base/Intent.cs


public const int URI_ALLOW_UNSAFE = 4;
public const int URI_ANDROID_APP_SCHEME = 2;
public const int URI_INTENT_SCHEME = 1;
public Intent (Intent arg0): base(arg0) { }
public Intent (string arg0): base(arg0) { }
public Intent (): base() { }
public Intent (): base() { }
public Intent (Intent arg0): base(arg0) { }
public Intent (string arg0): base(arg0) { }
public Intent setAction(string arg0) {
return Call<Intent>("setAction", arg0);
}

2
Assets/HuaweiHms/src/hms/Wrapper/base/PersistableBundle.cs


}
public class PersistableBundle :HmsClass<PersistableBundle_Data>
{
public PersistableBundle (): base() { }
public PersistableBundle (): base() { }
}
}

10
Assets/HuaweiHms/src/hms/Wrapper/base/Task.cs


public class Task :HmsClass<Task_Data>
{
public Task (): base() { }
public Task addOnCompleteListener(Activity arg0, OnCompleteListener arg1) {
public Task addOnCompleteListener(Executor arg0, OnCompleteListener arg1) {
public Task addOnCompleteListener(Executor arg0, OnCompleteListener arg1) {
public Task addOnCompleteListener(Activity arg0, OnCompleteListener arg1) {
return Call<Task>("addOnCompleteListener", arg0, arg1);
}
public bool isSuccessful() {

public Task addOnSuccessListener(Executor arg0, OnSuccessListener arg1) {
return Call<Task>("addOnSuccessListener", arg0, arg1);
}
public Task addOnFailureListener(OnFailureListener arg0) {
return Call<Task>("addOnFailureListener", arg0);
}
}
public Task addOnFailureListener(OnFailureListener arg0) {
return Call<Task>("addOnFailureListener", arg0);
}
public Task addOnFailureListener(Activity arg0, OnFailureListener arg1) {
return Call<Task>("addOnFailureListener", arg0, arg1);

5
Assets/HuaweiHms/src/hms/Wrapper/game_service/GameService.dll.meta


fileFormatVersion: 2
guid: 6f2c742ceda7a4b4fb6dfedf75715a06
timeCreated: 1583743990
licenseType: Free
defineConstraints: []
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:

2
Assets/HuaweiHms/src/hms/Wrapper/location/ActivityConversionData.cs


}
public class ActivityConversionData :HmsClass<ActivityConversionData_Data>
{
public ActivityConversionData (): base() { }
public ActivityConversionData (): base() { }
public int getActivityType() {
return Call<int>("getActivityType");
}

2
Assets/HuaweiHms/src/hms/Wrapper/location/ActivityConversionInfo.cs


{
public const int ENTER_ACTIVITY_CONVERSION = 0;
public const int EXIT_ACTIVITY_CONVERSION = 1;
public ActivityConversionInfo (): base() { }
public ActivityConversionInfo (): base() { }
public int getActivityType() {
return Call<int>("getActivityType");
}

2
Assets/HuaweiHms/src/hms/Wrapper/location/ActivityConversionRequest.cs


}
public class ActivityConversionRequest :HmsClass<ActivityConversionRequest_Data>
{
public ActivityConversionRequest (): base() { }
public ActivityConversionRequest (): base() { }
public void setDataToIntent(Intent arg0) {
Call("setDataToIntent", arg0);
}

2
Assets/HuaweiHms/src/hms/Wrapper/location/ActivityConversionResponse.cs


}
public class ActivityConversionResponse :HmsClass<ActivityConversionResponse_Data>
{
public ActivityConversionResponse (): base() { }
public ActivityConversionResponse (): base() { }
public static ActivityConversionResponse getDataFromIntent(Intent arg0) {
return CallStatic<ActivityConversionResponse>("getDataFromIntent", arg0);
}

4
Assets/HuaweiHms/src/hms/Wrapper/location/ActivityIdentificationResponse.cs


}
public class ActivityIdentificationResponse :HmsClass<ActivityIdentificationResponse_Data>
{
public ActivityIdentificationResponse (): base() { }
public ActivityIdentificationResponse (List arg0, long arg1, long arg2): base(arg0, arg1, arg2) { }
public ActivityIdentificationResponse (List arg0, long arg1, long arg2): base(arg0, arg1, arg2) { }
public ActivityIdentificationResponse (): base() { }
public static ActivityIdentificationResponse getDataFromIntent(Intent arg0) {
return CallStatic<ActivityIdentificationResponse>("getDataFromIntent", arg0);
}

6
Assets/HuaweiHms/src/hms/Wrapper/location/FusedLocationProviderClient.cs


public class FusedLocationProviderClient :HmsClass<FusedLocationProviderClient_Data>
{
public const string KEY_VERTICAL_ACCURACY = "verticalAccuracy";
public FusedLocationProviderClient (Activity arg0): base(arg0) { }
public FusedLocationProviderClient (Activity arg0): base(arg0) { }
public FusedLocationProviderClient (): base() { }
public Task flushLocations() {
return Call<Task>("flushLocations");

public Task getLocationAvailability() {
return Call<Task>("getLocationAvailability");
}
public Task removeLocationUpdates(PendingIntent arg0) {
public Task removeLocationUpdates(LocationCallback arg0) {
public Task removeLocationUpdates(LocationCallback arg0) {
public Task removeLocationUpdates(PendingIntent arg0) {
return Call<Task>("removeLocationUpdates", arg0);
}
public Task requestLocationUpdates(LocationRequest arg0, PendingIntent arg1) {

2
Assets/HuaweiHms/src/hms/Wrapper/location/GeofenceService.cs


}
public class GeofenceService :HmsClass<GeofenceService_Data>
{
public GeofenceService (Activity arg0): base(arg0) { }
public GeofenceService (Activity arg0): base(arg0) { }
public GeofenceService (): base() { }
public Task createGeofenceList(GeofenceRequest arg0, PendingIntent arg1) {
return Call<Task>("createGeofenceList", arg0, arg1);

4
Assets/HuaweiHms/src/hms/Wrapper/location/LocationServices.cs


public static FusedLocationProviderClient getFusedLocationProviderClient(Activity arg0) {
return CallStatic<FusedLocationProviderClient>("getFusedLocationProviderClient", arg0);
}
public static SettingsClient getSettingsClient(Context arg0) {
public static SettingsClient getSettingsClient(Activity arg0) {
public static SettingsClient getSettingsClient(Activity arg0) {
public static SettingsClient getSettingsClient(Context arg0) {
return CallStatic<SettingsClient>("getSettingsClient", arg0);
}
}

24
Assets/HuaweiHms/src/hms/Wrapper/location/LocationSettingsStates.cs


{
public LocationSettingsStates (): base() { }
public LocationSettingsStates (bool arg0, bool arg1, bool arg2, bool arg3, bool arg4, bool arg5): base(arg0, arg1, arg2, arg3, arg4, arg5) { }
public bool isBlePresent() {
return Call<bool>("isBlePresent");
}
public bool isBleUsable() {
return Call<bool>("isBleUsable");
}
public bool isGpsPresent() {
return Call<bool>("isGpsPresent");
}
public bool isGpsUsable() {
return Call<bool>("isGpsUsable");
}
public bool isLocationPresent() {
return Call<bool>("isLocationPresent");
}
public bool isLocationUsable() {
return Call<bool>("isLocationUsable");
}
public bool isNetworkLocationPresent() {
return Call<bool>("isNetworkLocationPresent");
}
public bool isNetworkLocationUsable() {
return Call<bool>("isNetworkLocationUsable");
}
}
}

2
Assets/HuaweiHms/src/hms/Wrapper/location/SettingsClient.cs


}
public class SettingsClient :HmsClass<SettingsClient_Data>
{
public SettingsClient (Activity arg0): base(arg0) { }
public SettingsClient (Activity arg0): base(arg0) { }
public SettingsClient (): base() { }
public Task checkLocationSettings(LocationSettingsRequest arg0) {
return Call<Task>("checkLocationSettings", arg0);

6
Assets/HuaweiHms/src/hms/Wrapper/push/HmsInstanceId.cs


public long getCreationTime() {
return Call<long>("getCreationTime");
}
public string getToken(string arg0, string arg1) {
return Call<string>("getToken", arg0, arg1);
}
}
public string getToken(string arg0, string arg1) {
return Call<string>("getToken", arg0, arg1);
}
public void deleteToken(string arg0, string arg1) {
Call("deleteToken", arg0, arg1);

78
Assets/HuaweiHms/src/hms/Wrapper/push/RemoteMessage.cs


return Call<string>("getToken");
}
public class Builder_Data : IHmsBaseClass{
public string name => "com.huawei.hms.push.RemoteMessage$Builder";
}
public class Builder :HmsClass<Builder_Data>
{
public Builder (string arg0): base(arg0) { }
public Builder (): base() { }
public Builder addData(string arg0, string arg1) {
return Call<Builder>("addData", arg0, arg1);
}
public Builder setData(Map arg0) {
return Call<Builder>("setData", arg0);
}
public Builder clearData() {
return Call<Builder>("clearData");
}
public Builder setMessageId(string arg0) {
return Call<Builder>("setMessageId", arg0);
}
public Builder setMessageType(string arg0) {
return Call<Builder>("setMessageType", arg0);
}
public Builder setTtl(int arg0) {
return Call<Builder>("setTtl", arg0);
}
public Builder setCollapseKey(string arg0) {
return Call<Builder>("setCollapseKey", arg0);
}
public Builder setSendMode(int arg0) {
return Call<Builder>("setSendMode", arg0);
}
public Builder setReceiptMode(int arg0) {
return Call<Builder>("setReceiptMode", arg0);
}
public RemoteMessage build() {
return Call<RemoteMessage>("build");
}
}
public class Notification_Data : IHmsBaseClass{
public string name => "com.huawei.hms.push.RemoteMessage$Notification";
}

}
public string getIntentUri() {
return Call<string>("getIntentUri");
}
}
public class Builder_Data : IHmsBaseClass{
public string name => "com.huawei.hms.push.RemoteMessage$Builder";
}
public class Builder :HmsClass<Builder_Data>
{
public Builder (string arg0): base(arg0) { }
public Builder (): base() { }
public Builder addData(string arg0, string arg1) {
return Call<Builder>("addData", arg0, arg1);
}
public Builder setData(Map arg0) {
return Call<Builder>("setData", arg0);
}
public Builder clearData() {
return Call<Builder>("clearData");
}
public Builder setMessageId(string arg0) {
return Call<Builder>("setMessageId", arg0);
}
public Builder setMessageType(string arg0) {
return Call<Builder>("setMessageType", arg0);
}
public Builder setTtl(int arg0) {
return Call<Builder>("setTtl", arg0);
}
public Builder setCollapseKey(string arg0) {
return Call<Builder>("setCollapseKey", arg0);
}
public Builder setSendMode(int arg0) {
return Call<Builder>("setSendMode", arg0);
}
public Builder setReceiptMode(int arg0) {
return Call<Builder>("setReceiptMode", arg0);
}
public RemoteMessage build() {
return Call<RemoteMessage>("build");
}
}
}

6
Assets/HuaweiHms/src/hms/Wrapper/remote_config/AGConnectConfig.cs


public void applyDefault(int arg0) {
Call("applyDefault", arg0);
}
public Task fetch(long arg0) {
return Call<Task>("fetch", arg0);
}
}
public Task fetch(long arg0) {
return Call<Task>("fetch", arg0);
}
public ConfigValues loadLastFetched() {
return Call<ConfigValues>("loadLastFetched");

4
Assets/HuaweiHmsDemo/Scripts/test/location/GetLocationAvailabilityTest.cs


private FusedLocationProviderClient mFusedLocationProviderClient;
public override void RegisterEvent(TestEvent registerEvent){
registerEvent("Get Location Availability",GetLastLocation);
registerEvent("Get Location Availability",GetLocationAvailability);
public void GetLastLocation()
public void GetLocationAvailability()
{
mFusedLocationProviderClient = LocationServices.getFusedLocationProviderClient(new Context());
try {

2
Assets/HuaweiHmsDemo/Scripts/test/location/GetLocationTest.cs


+ location.getLatitude());
})).addOnFailureListener(new HmsFailureListener((Exception e) =>
{
TestTip.Inst.ShowText("getLastLocation onFailure");
TestTip.Inst.ShowText("getLastLocation onFailure "+ e.toString());
}));
}
catch (System.Exception e)

2
Assets/HuaweiHmsDemo/Scripts/test/location/LocationListener.cs


}
public void onSuccess(T arg0)
{
TestTip.Inst.ShowText("OnSuccessListener onSsssuccess");
TestTip.Inst.ShowText("OnSuccessListener onSuccess");
if(CallBack != null)
{
CallBack.Invoke(arg0);

37
Assets/HuaweiHmsDemo/Scripts/test/location/LocationUpdateTest.cs


public override void RegisterEvent(TestEvent registerEvent)
{
registerEvent("SetPermission", SetPermission);
registerEvent("Check Location Setting", CheckLocationSetting);
registerEvent("update with callback-102", () => RequestLocationUpdates(102, CALLBACK));
registerEvent("update with callback-104", () => RequestLocationUpdates(104, CALLBACK));
registerEvent("update with callback-100", () => RequestLocationUpdates(100, CALLBACK));

new string[] {ACCESS_FINE_LOCATION, ACCESS_COARSE_LOCATION, ACCESS_BACKGROUND_LOCATION}
);
}
public void CheckLocationSetting()
{
TestTip.Inst.ShowText("RequestLocationUpdatesWithCallback start");
this.requestType = CALLBACK;
mFusedLocationProviderClient = LocationServices.getFusedLocationProviderClient(new Context());
mSettingsClient = LocationServices.getSettingsClient(new Context());
mLocationRequest = new LocationRequest();
mLocationRequest.setInterval(5000);
mLocationRequest.setPriority(102);
// get LocationSettingsRequest
LocationSettingsRequest.Builder builder = new LocationSettingsRequest.Builder();
builder.addLocationRequest(mLocationRequest);
LocationSettingsRequest locationSettingsRequest = builder.build();
Task task = mSettingsClient.checkLocationSettings(locationSettingsRequest);
task.addOnSuccessListener(new HmsSuccessListener<LocationSettingsResponse>((LocationSettingsResponse setting) =>
{
var status = setting.getLocationSettingsStates();
TestTip.Inst.ShowText($"isBlePresent :{status.isBlePresent()}");
TestTip.Inst.ShowText($"isBleUsable :{status.isBleUsable()}");
TestTip.Inst.ShowText($"isGpsPresent :{status.isGpsPresent()}");
TestTip.Inst.ShowText($"isGpsUsable :{status.isGpsUsable()}");
TestTip.Inst.ShowText($"isLocationPresent :{status.isLocationPresent()}");
TestTip.Inst.ShowText($"isLocationUsable :{status.isLocationUsable()}");
TestTip.Inst.ShowText($"isNetworkLocationPresent :{status.isNetworkLocationPresent()}");
TestTip.Inst.ShowText($"isNetworkLocationUsable :{status.isNetworkLocationUsable()}");
})).addOnFailureListener(new HmsFailureListener((Exception e) => SetSettingsFailuer(e)));
}
public void RequestLocationUpdates(int priority, int requestType)
{
TestTip.Inst.ShowText("RequestLocationUpdatesWithCallback start");

TestTip.Inst.ShowText("SetCallbackSuccess fail");
}));
}
public void SetHDSuccess()
{
if (mLocationCallback == null)

Task task = null;
switch (requestType)
{
case CALLBACK :
case CALLBACK:
task = mFusedLocationProviderClient.removeLocationUpdates(mLocationCallback);
break;
case INTENT:

task = mFusedLocationProviderClient.removeLocationUpdates(mLocationCallback);
break;;
break;
}
if (task != null)

6
Assets/HuaweiHmsDemo/Scripts/ui/TestView.cs


public bool LocationEnabled;
public bool RemoteConfigEnabled;
public bool AppLinkingEnabled;
public bool AppMessageEnabled;
public Transform btnParent;
public GameObject btnPrefab;
public TestTip testTip;

if (AppLinkingEnabled)
{
AppLinkingTest.GetInstance().RegisterEvent(RegistEvent);
}
if (AppMessageEnabled)
{
AppMessageTest.GetInstance().RegisterEvent(RegistEvent);
}
}

6
Assets/Plugins/Android/HmsAnalyticActivity.java


import com.huawei.hms.analytics.HiAnalyticsTools;
import com.unity3d.player.UnityPlayerActivity;
import com.huawei.agconnect.appmessaging.AGConnectAppMessaging;
import com.huawei.hms.aaid.HmsInstanceId;
private AGConnectAppMessaging appMessaging;
@Override
protected void onCreate(Bundle savedInstanceState) {

appMessaging = AGConnectAppMessaging.getInstance();
appMessaging.setDisplayEnable(false);
}
}

1
Assets/HuaweiHms/.DS_Store
文件差异内容过多而无法显示
查看文件

20
Assets/HuaweiHms/src/hms/Wrapper/appmessage/AGConnectAppMessagingOnDisplayListener.cs


using UnityEngine;
using System.Collections.Generic;
namespace HuaweiHms
{
public class AGConnectAppMessagingOnDisplayListenerData : IHmsBaseListener
{
public string name => "com.huawei.agconnect.appmessaging.AGConnectAppMessagingOnDisplayListener";
public string buildName => "";
}
public class AGConnectAppMessagingOnDisplayListener : HmsListener<AGConnectAppMessagingOnDisplayListenerData>
{
public virtual void onMessageDisplay(AppMessage arg0) { }
public void onMessageDisplay(AndroidJavaObject arg0){
onMessageDisplay(HmsUtil.GetHmsBase<AppMessage>(arg0));
}
}
}

11
Assets/HuaweiHms/src/hms/Wrapper/appmessage/AGConnectAppMessagingOnDisplayListener.cs.meta


fileFormatVersion: 2
guid: a8c057d1c8cfd4f7b878466106618145
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

930
Assets/HuaweiHmsDemo/Scenes/HmsAppMessageSampleScene.unity


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
OcclusionCullingSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
m_SceneGUID: 00000000000000000000000000000000
m_OcclusionCullingData: {fileID: 0}
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 9
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
m_FogDensity: 0.01
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 3
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 0}
m_HaloStrength: 0.5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 11
m_GIWorkflowMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 0
m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings:
serializedVersion: 12
m_Resolution: 2
m_BakeResolution: 40
m_AtlasSize: 1024
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 1
m_CompAOExponentDirect: 0
m_ExtractAmbientOcclusion: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 1
m_FinalGather: 0
m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 256
m_ReflectionCompression: 2
m_MixedBakeMode: 2
m_BakeBackend: 0
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 500
m_PVRBounces: 2
m_PVREnvironmentSampleCount: 500
m_PVREnvironmentReferencePointCount: 2048
m_PVRFilteringMode: 2
m_PVRDenoiserTypeDirect: 0
m_PVRDenoiserTypeIndirect: 0
m_PVRDenoiserTypeAO: 0
m_PVRFilterTypeDirect: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVREnvironmentMIS: 0
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
m_ExportTrainingData: 0
m_TrainingDataDestination: TrainingData
m_LightProbeSampleCountMultiplier: 4
m_LightingDataAsset: {fileID: 0}
m_UseShadowmask: 1
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentTypeID: 0
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
minRegionArea: 2
manualCellSize: 0
cellSize: 0.16666667
manualTileSize: 0
tileSize: 256
accuratePlacement: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &64151422
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 64151423}
- component: {fileID: 64151426}
- component: {fileID: 64151425}
- component: {fileID: 64151424}
- component: {fileID: 64151427}
m_Layer: 5
m_Name: sv:view
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &64151423
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 64151422}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1733873861}
m_Father: {fileID: 1116013461}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 210}
m_SizeDelta: {x: -270, y: -480}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &64151424
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 64151422}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1aa08ab6e0800fa44ae55d278d1423e3, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Content: {fileID: 1664072771}
m_Horizontal: 0
m_Vertical: 1
m_MovementType: 1
m_Elasticity: 0.1
m_Inertia: 1
m_DecelerationRate: 0.135
m_ScrollSensitivity: 1
m_Viewport: {fileID: 1733873861}
m_HorizontalScrollbar: {fileID: 0}
m_VerticalScrollbar: {fileID: 0}
m_HorizontalScrollbarVisibility: 2
m_VerticalScrollbarVisibility: 2
m_HorizontalScrollbarSpacing: -3
m_VerticalScrollbarSpacing: -3
m_OnValueChanged:
m_PersistentCalls:
m_Calls: []
--- !u!114 &64151425
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 64151422}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 0.392}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &64151426
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 64151422}
m_CullTransparentMesh: 0
--- !u!114 &64151427
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 64151422}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c3ea94a9d52ef41e4b664616c38e4895, type: 3}
m_Name:
m_EditorClassIdentifier:
AdsEnabled: 0
AnalyticEnabled: 0
PushEnabled: 0
LocationEnabled: 0
RemoteConfigEnabled: 0
AppLinkingEnabled: 0
AppMessageEnabled: 1
btnParent: {fileID: 1664072771}
btnPrefab: {fileID: 5079351762955741576, guid: d221bb8c0c7b8476294abb3b987699b9,
type: 3}
testTip: {fileID: 1515889764}
start: 0
space: 100
--- !u!1 &519420028
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 519420032}
- component: {fileID: 519420031}
- component: {fileID: 519420029}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &519420029
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 519420028}
m_Enabled: 1
--- !u!20 &519420031
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 519420028}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 2
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_FocalLength: 50
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
field of view: 60
orthographic: 1
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 0
m_HDR: 1
m_AllowMSAA: 0
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 0
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!4 &519420032
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 519420028}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &919148484
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 919148487}
- component: {fileID: 919148486}
- component: {fileID: 919148485}
m_Layer: 0
m_Name: EventSystem
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &919148485
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 919148484}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
m_Name:
m_EditorClassIdentifier:
m_HorizontalAxis: Horizontal
m_VerticalAxis: Vertical
m_SubmitButton: Submit
m_CancelButton: Cancel
m_InputActionsPerSecond: 10
m_RepeatDelay: 0.5
m_ForceModuleActive: 0
--- !u!114 &919148486
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 919148484}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}
m_Name:
m_EditorClassIdentifier:
m_FirstSelected: {fileID: 0}
m_sendNavigationEvents: 1
m_DragThreshold: 10
--- !u!4 &919148487
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 919148484}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1019461435
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1019461436}
- component: {fileID: 1019461439}
- component: {fileID: 1019461438}
- component: {fileID: 1019461437}
m_Layer: 5
m_Name: Viewport
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1019461436
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1019461435}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1515889761}
m_Father: {fileID: 1569273470}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: -17, y: 0}
m_Pivot: {x: 0, y: 1}
--- !u!114 &1019461437
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1019461435}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 31a19414c41e5ae4aae2af33fee712f6, type: 3}
m_Name:
m_EditorClassIdentifier:
m_ShowMaskGraphic: 0
--- !u!114 &1019461438
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1019461435}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10917, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &1019461439
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1019461435}
m_CullTransparentMesh: 0
--- !u!1 &1116013457
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1116013461}
- component: {fileID: 1116013460}
- component: {fileID: 1116013459}
- component: {fileID: 1116013458}
m_Layer: 5
m_Name: Canvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1116013458
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1116013457}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!114 &1116013459
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1116013457}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 0
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
--- !u!223 &1116013460
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1116013457}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 0
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!224 &1116013461
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1116013457}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 64151423}
- {fileID: 1569273470}
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0}
--- !u!1 &1515889760
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1515889761}
- component: {fileID: 1515889763}
- component: {fileID: 1515889762}
- component: {fileID: 1515889764}
- component: {fileID: 1515889765}
m_Layer: 5
m_Name: tip
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1515889761
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1515889760}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1019461436}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0}
--- !u!114 &1515889762
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1515889760}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 0
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 30
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 1
m_MaxSize: 40
m_Alignment: 0
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text:
--- !u!222 &1515889763
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1515889760}
m_CullTransparentMesh: 0
--- !u!114 &1515889764
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1515889760}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d2e3734de11284ada8356989220882e2, type: 3}
m_Name:
m_EditorClassIdentifier:
text: {fileID: 1515889762}
--- !u!114 &1515889765
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1515889760}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
m_Name:
m_EditorClassIdentifier:
m_HorizontalFit: 0
m_VerticalFit: 2
--- !u!1 &1569273469
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1569273470}
- component: {fileID: 1569273473}
- component: {fileID: 1569273472}
- component: {fileID: 1569273471}
m_Layer: 5
m_Name: sv:tip
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1569273470
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1569273469}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1019461436}
m_Father: {fileID: 1116013461}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: 0, y: 60}
m_SizeDelta: {x: -360, y: 360}
m_Pivot: {x: 0.5, y: 0}
--- !u!114 &1569273471
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1569273469}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1aa08ab6e0800fa44ae55d278d1423e3, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Content: {fileID: 1515889761}
m_Horizontal: 0
m_Vertical: 1
m_MovementType: 1
m_Elasticity: 0.1
m_Inertia: 1
m_DecelerationRate: 0.135
m_ScrollSensitivity: 1
m_Viewport: {fileID: 1019461436}
m_HorizontalScrollbar: {fileID: 0}
m_VerticalScrollbar: {fileID: 0}
m_HorizontalScrollbarVisibility: 2
m_VerticalScrollbarVisibility: 1
m_HorizontalScrollbarSpacing: -3
m_VerticalScrollbarSpacing: -3
m_OnValueChanged:
m_PersistentCalls:
m_Calls: []
--- !u!114 &1569273472
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1569273469}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 0.392}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &1569273473
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1569273469}
m_CullTransparentMesh: 0
--- !u!1 &1664072770
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1664072771}
m_Layer: 5
m_Name: Content
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1664072771
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1664072770}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1733873861}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: 0, y: 720}
m_SizeDelta: {x: 0, y: 2880}
m_Pivot: {x: 0.5, y: 1}
--- !u!1 &1733873860
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1733873861}
- component: {fileID: 1733873864}
- component: {fileID: 1733873863}
- component: {fileID: 1733873862}
m_Layer: 5
m_Name: Viewport
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1733873861
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1733873860}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1664072771}
m_Father: {fileID: 64151423}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 1}
--- !u!114 &1733873862
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1733873860}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 31a19414c41e5ae4aae2af33fee712f6, type: 3}
m_Name:
m_EditorClassIdentifier:
m_ShowMaskGraphic: 0
--- !u!114 &1733873863
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1733873860}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10917, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &1733873864
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1733873860}
m_CullTransparentMesh: 0

7
Assets/HuaweiHmsDemo/Scenes/HmsAppMessageSampleScene.unity.meta


fileFormatVersion: 2
guid: b3476cb507ef74fc3ba3f5a751256fe8
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Assets/HuaweiHmsDemo/Scripts/test/appmessage.meta


fileFormatVersion: 2
guid: 35b5d27f538f54422a26905ec3da2f02
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

31
Assets/HuaweiHmsDemo/Scripts/test/appmessage/AppMessageListener.cs


using System.Collections;
using System.Collections.Generic;
using HuaweiHms;
using UnityEngine;
namespace HuaweiHmsDemo
{
public class ClickListener : AGConnectAppMessagingOnClickListener
{
public override void onMessageClick(AppMessage arg0)
{
// base.onMessageClick(arg0);
TestTip.Inst.ShowText($"{arg0.getId()}");
TestTip.Inst.ShowText($"{arg0.getEndTime()}");
TestTip.Inst.ShowText($"{arg0.getFrequencyType()}");
}
}
public class CustomDisplayView : AGConnectAppMessagingDisplay
{
public override void displayMessage(AppMessage arg0, AGConnectAppMessagingCallback arg1)
{
// base.displayMessage(arg0, arg1);
TestTip.Inst.ShowText($"id: {arg0.getId()}");
TestTip.Inst.ShowText($"start time: {arg0.getStartTime()}");
TestTip.Inst.ShowText($"end time: {arg0.getEndTime()}");
TestTip.Inst.ShowText($"frequency type: {arg0.getFrequencyType()}");
}
}
}

11
Assets/HuaweiHmsDemo/Scripts/test/appmessage/AppMessageListener.cs.meta


fileFormatVersion: 2
guid: 7b4205b822a0e4574a3ad9f4ef33ce41
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

61
Assets/HuaweiHmsDemo/Scripts/test/appmessage/AppMessageTest.cs


using System.Security.Cryptography;
using HuaweiHms;
using UnityEngine;
namespace HuaweiHmsDemo
{
public class AppMessageTest : Test<AppMessageTest>
{
private AGConnectAppMessaging appMessaging
{
get
{
if (_appMessaging == null)
{
_appMessaging = AGConnectAppMessaging.getInstance();
}
return _appMessaging;
}
}
private AGConnectAppMessaging _appMessaging;
public bool showApp = false;
public override void RegisterEvent(TestEvent registerEvent)
{
registerEvent("Show/Hide App Message", ShowAppMessage);
registerEvent("Add OnClick Listener", AddOnClickListener);
registerEvent("Register Custom view", RegisterCustomView);
registerEvent("Remove Custom view", RemoveCustomView);
}
public void ShowAppMessage()
{
showApp = !showApp;
appMessaging.setDisplayEnable(showApp);
TestTip.Inst.ShowText($"set display to {showApp}");
}
public void AddOnClickListener()
{
ClickListener listener = new ClickListener();
appMessaging.addOnClickListener(listener);
TestTip.Inst.ShowText("Add on click listener success");
}
public void RegisterCustomView()
{
CustomDisplayView view = new CustomDisplayView();
appMessaging.addCustomView(view);
TestTip.Inst.ShowText("Add custom view success");
}
public void RemoveCustomView()
{
appMessaging.removeCustomView();
TestTip.Inst.ShowText("remove custom view success");
}
}
}

3
Assets/HuaweiHmsDemo/Scripts/test/appmessage/AppMessageTest.cs.meta


fileFormatVersion: 2
guid: e90fd499b6b6d4f96a340fafc48ea221
timeCreated: 1604043656
正在加载...
取消
保存