app center;增加發送ping的秒

This commit is contained in:
Caiyanpeng committed 2021-11-12 16:21:13 +08:00
1 parent 1bd1ffdb5a
commit d754ff3b15
719 files changed
+34172 -2875

No files matched your search

@@ -0,0 +1,87 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
#if UNITY_WSA_10_0 && !UNITY_EDITOR
using System;
using System.Collections.Generic;
using UnityEngine;
namespace Microsoft.AppCenter.Unity.Analytics.Internal
{
using UWPAnalytics = Microsoft.AppCenter.Analytics.Analytics;
class AnalyticsInternal
{
private static bool _warningLogged = false;
public static void PrepareEventHandlers()
{
}
public static void AddNativeType(List<Type> nativeTypes)
{
nativeTypes.Add(typeof(UWPAnalytics));
}
public static void TrackEvent(string eventName)
{
UWPAnalytics.TrackEvent(eventName);
}
public static void TrackEvent(string eventName, int flags)
{
TrackEvent(eventName);
}
public static void TrackEventWithProperties(string eventName, IDictionary<string, string> properties)
{
UWPAnalytics.TrackEvent(eventName, properties);
}
public static void TrackEventWithProperties(string eventName, EventProperties properties)
{
if (!_warningLogged)
{
Debug.LogWarning("Warning: Strongly typed properties are not supported on UWP platform. " +
"All property values will be converted to strings for this and all the future calls.");
_warningLogged = true;
}
UWPAnalytics.TrackEvent(eventName, properties.GetRawObject());
}
public static void TrackEventWithProperties(string eventName, IDictionary<string, string> properties, int flags)
{
TrackEventWithProperties(eventName, properties);
}
public static void TrackEventWithProperties(string eventName, EventProperties properties, int flags)
{
TrackEventWithProperties(eventName, properties);
}
public static AppCenterTask SetEnabledAsync(bool isEnabled)
{
return new AppCenterTask(UWPAnalytics.SetEnabledAsync(isEnabled));
}
public static AppCenterTask<bool> IsEnabledAsync()
{
return new AppCenterTask<bool>(UWPAnalytics.IsEnabledAsync());
}
public static Type GetTransmissionTarget(string transmissionTargetToken, out bool success)
{
success = false;
return null;
}
public static void Pause()
{
}
public static void Resume()
{
}
}
}
#endif
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 9a6f77be941594c1389be7cfade7f372
timeCreated: 1499378836
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,46 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
#if UNITY_WSA_10_0 && !UNITY_EDITOR
using System;
using System.Collections.Generic;
using System.Globalization;
namespace Microsoft.AppCenter.Unity.Analytics.Internal
{
class EventPropertiesInternal
{
public static Dictionary<string, string> Create()
{
return new Dictionary<string, string>();
}
public static void SetString(Dictionary<string, string> properties, string key, string val)
{
properties[key] = val;
}
public static void SetNumber(Dictionary<string, string> properties, string key, long val)
{
properties[key] = val.ToString(CultureInfo.InvariantCulture);
}
public static void SetNumber(Dictionary<string, string> properties, string key, double val)
{
properties[key] = val.ToString(CultureInfo.InvariantCulture);
}
public static void SetBool(Dictionary<string, string> properties, string key, bool val)
{
properties[key] = val.ToString();
}
public static void SetDate(Dictionary<string, string> properties, string key, DateTime val)
{
var format = "yyyy-MM-dd'T'HH:mm:ss.fffK";
var dateString = val.ToString(format, CultureInfo.InvariantCulture);
properties[key] = dateString;
}
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: d05cde6a93c1790458dbfb4a909075e9
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,58 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
#if UNITY_WSA_10_0 && !UNITY_EDITOR
using System;
using System.Collections.Generic;
using Microsoft.AppCenter.Unity.Analytics.Internal;
namespace Microsoft.AppCenter.Unity.Analytics
{
public class PropertyConfiguratorInternal
{
public static void SetAppName(object propertyConfigurator, string appName)
{
}
public static void SetUserId(object propertyConfigurator, string userId)
{
}
public static void SetAppVersion(object propertyConfigurator, string appVersion)
{
}
public static void SetAppLocale(object propertyConfigurator, string appLocale)
{
}
public static void SetEventProperty(object propertyConfigurator, string key, string value)
{
}
public static void SetEventProperty(object propertyConfigurator, string key, DateTime value)
{
}
public static void SetEventProperty(object propertyConfigurator, string key, long value)
{
}
public static void SetEventProperty(object propertyConfigurator, string key, double value)
{
}
public static void SetEventProperty(object propertyConfigurator, string key, bool value)
{
}
public static void RemoveEventProperty(object propertyConfigurator, string key)
{
}
public static void CollectDeviceId(object propertyConfigurator)
{
}
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 1da96695a43e9487086154cd35a3b8d0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,67 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
#if UNITY_WSA_10_0 && !UNITY_EDITOR
using Microsoft.AppCenter.Unity.Analytics.Internal;
using System;
using System.Collections.Generic;
namespace Microsoft.AppCenter.Unity.Analytics
{
public class TransmissionTargetInternal
{
public static void TrackEvent(object transmissionTarget, string eventName)
{
}
public static void TrackEvent(object transmissionTarget, string eventName, int flags)
{
}
public static void TrackEventWithProperties(object transmissionTarget, string eventName, IDictionary<string, string> properties)
{
}
public static void TrackEventWithProperties(object transmissionTarget, string eventName, EventProperties properties)
{
}
public static void TrackEventWithProperties(object transmissionTarget, string eventName, IDictionary<string, string> properties, int flags)
{
}
public static void TrackEventWithProperties(object transmissionTarget, string eventName, EventProperties properties, int flags)
{
}
public static AppCenterTask SetEnabledAsync(object transmissionTarget, bool enabled)
{
return AppCenterTask.FromCompleted();
}
public static AppCenterTask<bool> IsEnabledAsync(object transmissionTarget)
{
return AppCenterTask<bool>.FromCompleted(false);
}
public static TransmissionTargetInternal GetTransmissionTarget(object transmissionTargetParent, string transmissionTargetToken, out bool success)
{
success = false;
return null;
}
public static PropertyConfiguratorInternal GetPropertyConfigurator(object transmissionTargetParent)
{
return null;
}
public static void Pause(object transmissionTarget)
{
}
public static void Resume(object transmissionTarget)
{
}
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: cef60ebaae8af49db8dc3de5394263ae
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: