app center;增加發送ping的秒
This commit is contained in:
1 parent
1bd1ffdb5a
commit
d754ff3b15
719 files changed
+34172
-2875
No files matched your search
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3081e1f5b9e3f4598ba1d4ec33c30d17
|
||||
folderAsset: yes
|
||||
timeCreated: 1498059874
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,96 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
#if UNITY_ANDROID && !UNITY_EDITOR
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.AppCenter.Unity.Internal.Utility;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Microsoft.AppCenter.Unity.Analytics.Internal
|
||||
{
|
||||
class AnalyticsInternal
|
||||
{
|
||||
private static AndroidJavaClass _analytics = new AndroidJavaClass("com.microsoft.appcenter.analytics.Analytics");
|
||||
|
||||
public static void PrepareEventHandlers()
|
||||
{
|
||||
AppCenterBehavior.InitializedAppCenterAndServices += PostInitialize;
|
||||
}
|
||||
|
||||
private static void PostInitialize()
|
||||
{
|
||||
var instance = _analytics.CallStatic<AndroidJavaObject>("getInstance");
|
||||
AndroidJavaClass unityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
|
||||
AndroidJavaObject activity = unityPlayer.GetStatic<AndroidJavaObject>("currentActivity");
|
||||
instance.Call("onActivityResumed", activity);
|
||||
}
|
||||
|
||||
public static void AddNativeType(List<IntPtr> nativeTypes)
|
||||
{
|
||||
nativeTypes.Add(AndroidJNI.FindClass("com/microsoft/appcenter/analytics/Analytics"));
|
||||
}
|
||||
|
||||
public static void TrackEvent(string eventName)
|
||||
{
|
||||
_analytics.CallStatic("trackEvent", eventName);
|
||||
}
|
||||
|
||||
public static void TrackEvent(string eventName, int flags)
|
||||
{
|
||||
_analytics.CallStatic("trackEvent", eventName, null, flags);
|
||||
}
|
||||
|
||||
public static void TrackEventWithProperties(string eventName, IDictionary<string, string> properties)
|
||||
{
|
||||
var androidProperties = JavaStringMapHelper.ConvertToJava(properties);
|
||||
_analytics.CallStatic("trackEvent", eventName, androidProperties);
|
||||
}
|
||||
|
||||
public static void TrackEventWithProperties(string eventName, EventProperties properties)
|
||||
{
|
||||
_analytics.CallStatic("trackEvent", eventName, properties.GetRawObject());
|
||||
}
|
||||
|
||||
public static void TrackEventWithProperties(string eventName, IDictionary<string, string> properties, int flags)
|
||||
{
|
||||
var androidProperties = JavaStringMapHelper.ConvertToJava(properties);
|
||||
_analytics.CallStatic("trackEvent", eventName, androidProperties, flags);
|
||||
}
|
||||
|
||||
public static void TrackEventWithProperties(string eventName, EventProperties properties, int flags)
|
||||
{
|
||||
_analytics.CallStatic("trackEvent", eventName, properties.GetRawObject(), flags);
|
||||
}
|
||||
|
||||
public static AppCenterTask SetEnabledAsync(bool isEnabled)
|
||||
{
|
||||
var future = _analytics.CallStatic<AndroidJavaObject>("setEnabled", isEnabled);
|
||||
return new AppCenterTask(future);
|
||||
}
|
||||
|
||||
public static AppCenterTask<bool> IsEnabledAsync()
|
||||
{
|
||||
var future = _analytics.CallStatic<AndroidJavaObject>("isEnabled");
|
||||
return new AppCenterTask<bool>(future);
|
||||
}
|
||||
|
||||
public static AndroidJavaObject GetTransmissionTarget(string transmissionTargetToken, out bool success)
|
||||
{
|
||||
var target = _analytics.CallStatic<AndroidJavaObject>("getTransmissionTarget", transmissionTargetToken);
|
||||
success = target != null;
|
||||
return target;
|
||||
}
|
||||
|
||||
public static void Pause()
|
||||
{
|
||||
_analytics.CallStatic("pause");
|
||||
}
|
||||
|
||||
public static void Resume()
|
||||
{
|
||||
_analytics.CallStatic("resume");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a713100f59727486c9ad45c500332234
|
||||
timeCreated: 1497467718
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,44 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
#if UNITY_ANDROID && !UNITY_EDITOR
|
||||
using Microsoft.AppCenter.Unity.Internal.Utility;
|
||||
namespace Microsoft.AppCenter.Unity.Analytics.Internal
|
||||
{
|
||||
class EventPropertiesInternal
|
||||
{
|
||||
public static AndroidJavaObject Create()
|
||||
{
|
||||
return new AndroidJavaObject("com.microsoft.appcenter.analytics.EventProperties");
|
||||
}
|
||||
|
||||
public static void SetString(AndroidJavaObject properties, string key, string val)
|
||||
{
|
||||
properties.Call<AndroidJavaObject>("set", key, val);
|
||||
}
|
||||
|
||||
public static void SetNumber(AndroidJavaObject properties, string key, long val)
|
||||
{
|
||||
properties.Call<AndroidJavaObject>("set", key, val);
|
||||
}
|
||||
|
||||
public static void SetNumber(AndroidJavaObject properties, string key, double val)
|
||||
{
|
||||
properties.Call<AndroidJavaObject>("set", key, val);
|
||||
}
|
||||
|
||||
public static void SetBool(AndroidJavaObject properties, string key, bool val)
|
||||
{
|
||||
properties.Call<AndroidJavaObject>("set", key, val);
|
||||
}
|
||||
|
||||
public static void SetDate(AndroidJavaObject properties, string key, DateTime val)
|
||||
{
|
||||
properties.Call<AndroidJavaObject>("set", key, JavaDateHelper.DateTimeConvert(val));
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 514cee750a1f56f4bab5c663b3a4f557
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
#if UNITY_ANDROID && !UNITY_EDITOR
|
||||
using UnityEngine;
|
||||
using Microsoft.AppCenter.Unity.Internal.Utility;
|
||||
using System;
|
||||
|
||||
namespace Microsoft.AppCenter.Unity.Analytics
|
||||
{
|
||||
public class PropertyConfiguratorInternal
|
||||
{
|
||||
public static void SetAppName(AndroidJavaObject propertyConfigurator, string appName)
|
||||
{
|
||||
propertyConfigurator.Call("setAppName", appName);
|
||||
}
|
||||
|
||||
public static void SetUserId(AndroidJavaObject propertyConfigurator, string userId)
|
||||
{
|
||||
propertyConfigurator.Call("setUserId", userId);
|
||||
}
|
||||
|
||||
public static void SetAppVersion(AndroidJavaObject propertyConfigurator, string appVersion)
|
||||
{
|
||||
propertyConfigurator.Call("setAppVersion", appVersion);
|
||||
}
|
||||
|
||||
public static void SetAppLocale(AndroidJavaObject propertyConfigurator, string appLocale)
|
||||
{
|
||||
propertyConfigurator.Call("setAppLocale", appLocale);
|
||||
}
|
||||
|
||||
public static void CollectDeviceId(AndroidJavaObject propertyConfigurator)
|
||||
{
|
||||
propertyConfigurator.Call("collectDeviceId");
|
||||
}
|
||||
|
||||
public static void SetEventProperty(AndroidJavaObject propertyConfigurator, string key, string value)
|
||||
{
|
||||
propertyConfigurator.Call("setEventProperty", key, value);
|
||||
}
|
||||
|
||||
public static void SetEventProperty(AndroidJavaObject propertyConfigurator, string key, DateTime value)
|
||||
{
|
||||
var javaDate = JavaDateHelper.DateTimeConvert(value);
|
||||
propertyConfigurator.Call("setEventProperty", key, javaDate);
|
||||
}
|
||||
|
||||
public static void SetEventProperty(AndroidJavaObject propertyConfigurator, string key, long value)
|
||||
{
|
||||
propertyConfigurator.Call("setEventProperty", key, value);
|
||||
}
|
||||
|
||||
public static void SetEventProperty(AndroidJavaObject propertyConfigurator, string key, double value)
|
||||
{
|
||||
propertyConfigurator.Call("setEventProperty", key, value);
|
||||
}
|
||||
|
||||
public static void SetEventProperty(AndroidJavaObject propertyConfigurator, string key, bool value)
|
||||
{
|
||||
propertyConfigurator.Call("setEventProperty", key, value);
|
||||
}
|
||||
|
||||
public static void RemoveEventProperty(AndroidJavaObject propertyConfigurator, string key)
|
||||
{
|
||||
propertyConfigurator.Call("removeEventProperty", key);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e670e8c4e24f54cb3b15b96cba63313b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,82 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
#if UNITY_ANDROID && !UNITY_EDITOR
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using Microsoft.AppCenter.Unity.Analytics.Internal;
|
||||
using Microsoft.AppCenter.Unity.Internal.Utility;
|
||||
|
||||
namespace Microsoft.AppCenter.Unity.Analytics
|
||||
{
|
||||
public class TransmissionTargetInternal
|
||||
{
|
||||
public static void TrackEvent(AndroidJavaObject transmissionTarget, string eventName)
|
||||
{
|
||||
transmissionTarget.Call("trackEvent", eventName);
|
||||
}
|
||||
|
||||
public static void TrackEvent(AndroidJavaObject transmissionTarget, string eventName, int flags)
|
||||
{
|
||||
transmissionTarget.Call("trackEvent", eventName, null, flags);
|
||||
}
|
||||
|
||||
public static void TrackEventWithProperties(AndroidJavaObject transmissionTarget, string eventName, IDictionary<string, string> properties)
|
||||
{
|
||||
var androidProperties = JavaStringMapHelper.ConvertToJava(properties);
|
||||
transmissionTarget.Call("trackEvent", eventName, androidProperties);
|
||||
}
|
||||
|
||||
public static void TrackEventWithProperties(AndroidJavaObject transmissionTarget, string eventName, EventProperties properties)
|
||||
{
|
||||
transmissionTarget.Call("trackEvent", eventName, properties.GetRawObject());
|
||||
}
|
||||
|
||||
public static void TrackEventWithProperties(AndroidJavaObject transmissionTarget, string eventName, IDictionary<string, string> properties, int flags)
|
||||
{
|
||||
var androidProperties = JavaStringMapHelper.ConvertToJava(properties);
|
||||
transmissionTarget.Call("trackEvent", eventName, androidProperties, flags);
|
||||
}
|
||||
|
||||
public static void TrackEventWithProperties(AndroidJavaObject transmissionTarget, string eventName, EventProperties properties, int flags)
|
||||
{
|
||||
transmissionTarget.Call("trackEvent", eventName, properties.GetRawObject(), flags);
|
||||
}
|
||||
|
||||
public static AppCenterTask SetEnabledAsync(AndroidJavaObject transmissionTarget, bool enabled)
|
||||
{
|
||||
var future = transmissionTarget.Call<AndroidJavaObject>("setEnabledAsync", enabled);
|
||||
return new AppCenterTask(future);
|
||||
}
|
||||
|
||||
public static AppCenterTask<bool> IsEnabledAsync(AndroidJavaObject transmissionTarget)
|
||||
{
|
||||
var future = transmissionTarget.Call<AndroidJavaObject>("isEnabledAsync");
|
||||
return new AppCenterTask<bool>(future);
|
||||
}
|
||||
|
||||
public static AndroidJavaObject GetTransmissionTarget(AndroidJavaObject transmissionTargetParent, string transmissionTargetToken, out bool success)
|
||||
{
|
||||
var target = transmissionTargetParent.Call<AndroidJavaObject>("getTransmissionTarget", transmissionTargetToken);
|
||||
success = target != null;
|
||||
return target;
|
||||
}
|
||||
|
||||
public static AndroidJavaObject GetPropertyConfigurator(AndroidJavaObject transmissionTarget)
|
||||
{
|
||||
return transmissionTarget.Call<AndroidJavaObject>("getPropertyConfigurator");
|
||||
}
|
||||
|
||||
public static void Pause(AndroidJavaObject transmissionTarget)
|
||||
{
|
||||
transmissionTarget.Call("pause");
|
||||
}
|
||||
|
||||
public static void Resume(AndroidJavaObject transmissionTarget)
|
||||
{
|
||||
transmissionTarget.Call("resume");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9b4de3e63b6764e059567a9e87feda60
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 05baa696b2306473096af3c82bf25429
|
||||
folderAsset: yes
|
||||
timeCreated: 1498059884
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,83 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
#if (!UNITY_IOS && !UNITY_ANDROID && !UNITY_WSA_10_0) || UNITY_EDITOR
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Microsoft.AppCenter.Unity.Analytics.Internal
|
||||
{
|
||||
#if UNITY_IOS || UNITY_ANDROID
|
||||
using RawType = System.IntPtr;
|
||||
#else
|
||||
using RawType = System.Type;
|
||||
#endif
|
||||
|
||||
#if UNITY_IOS
|
||||
using TransmissionTargetType = System.IntPtr;
|
||||
#elif UNITY_ANDROID
|
||||
using TransmissionTargetType = UnityEngine.AndroidJavaObject;
|
||||
#else
|
||||
using TransmissionTargetType = System.Object;
|
||||
#endif
|
||||
|
||||
class AnalyticsInternal
|
||||
{
|
||||
public static void PrepareEventHandlers()
|
||||
{
|
||||
}
|
||||
|
||||
public static void AddNativeType(List<RawType> nativeTypes)
|
||||
{
|
||||
}
|
||||
|
||||
public static void TrackEvent(string eventName)
|
||||
{
|
||||
}
|
||||
|
||||
public static void TrackEvent(string eventName, int flags)
|
||||
{
|
||||
}
|
||||
|
||||
public static void TrackEventWithProperties(string eventName, IDictionary<string, string> properties)
|
||||
{
|
||||
}
|
||||
|
||||
public static void TrackEventWithProperties(string eventName, EventProperties properties)
|
||||
{
|
||||
}
|
||||
|
||||
public static void TrackEventWithProperties(string eventName, IDictionary<string, string> properties, int flags)
|
||||
{
|
||||
}
|
||||
|
||||
public static void TrackEventWithProperties(string eventName, EventProperties properties, int flags)
|
||||
{
|
||||
}
|
||||
|
||||
public static AppCenterTask SetEnabledAsync(bool enabled)
|
||||
{
|
||||
return AppCenterTask.FromCompleted();
|
||||
}
|
||||
|
||||
public static AppCenterTask<bool> IsEnabledAsync()
|
||||
{
|
||||
return AppCenterTask<bool>.FromCompleted(false);
|
||||
}
|
||||
|
||||
public static TransmissionTargetType GetTransmissionTarget(string transmissionTargetToken, out bool success)
|
||||
{
|
||||
success = false;
|
||||
return default(TransmissionTargetType);
|
||||
}
|
||||
|
||||
public static void Pause()
|
||||
{
|
||||
}
|
||||
|
||||
public static void Resume()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 632c05efd92fe4ec9b424381b5392d76
|
||||
timeCreated: 1497465139
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,41 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
#if (!UNITY_IOS && !UNITY_ANDROID && !UNITY_WSA_10_0) || UNITY_EDITOR
|
||||
using System;
|
||||
|
||||
namespace Microsoft.AppCenter.Unity.Analytics.Internal
|
||||
{
|
||||
#if UNITY_IOS
|
||||
using RawType = System.IntPtr;
|
||||
#elif UNITY_ANDROID
|
||||
using RawType = UnityEngine.AndroidJavaObject;
|
||||
#else
|
||||
using RawType = System.Object;
|
||||
#endif
|
||||
|
||||
class EventPropertiesInternal
|
||||
{
|
||||
public static RawType Create()
|
||||
{
|
||||
return default(RawType);
|
||||
}
|
||||
|
||||
public static void SetString(RawType properties, string key, string val)
|
||||
{
|
||||
}
|
||||
|
||||
public static void SetNumber(RawType properties, string key, object val)
|
||||
{
|
||||
}
|
||||
|
||||
public static void SetBool(RawType properties, string key, bool val)
|
||||
{
|
||||
}
|
||||
|
||||
public static void SetDate(RawType properties, string key, DateTime val)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 61494a0be6a398041ad0f0aa1de5408e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,66 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
#if (!UNITY_IOS && !UNITY_ANDROID && !UNITY_WSA_10_0) || UNITY_EDITOR
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.AppCenter.Unity.Analytics.Internal;
|
||||
|
||||
namespace Microsoft.AppCenter.Unity.Analytics
|
||||
{
|
||||
#if UNITY_IOS
|
||||
using RawType = System.IntPtr;
|
||||
#elif UNITY_ANDROID
|
||||
using RawType = UnityEngine.AndroidJavaObject;
|
||||
#else
|
||||
using RawType = System.Object;
|
||||
#endif
|
||||
|
||||
public class PropertyConfiguratorInternal
|
||||
{
|
||||
public static void SetAppName(RawType propertyConfigurator, string appName)
|
||||
{
|
||||
}
|
||||
|
||||
public static void SetUserId(RawType propertyConfigurator, string userId)
|
||||
{
|
||||
}
|
||||
|
||||
public static void SetAppVersion(RawType propertyConfigurator, string appVersion)
|
||||
{
|
||||
}
|
||||
|
||||
public static void SetAppLocale(RawType propertyConfigurator, string appLocale)
|
||||
{
|
||||
}
|
||||
|
||||
public static void CollectDeviceId(RawType propertyConfigurator)
|
||||
{
|
||||
}
|
||||
|
||||
public static void SetEventProperty(RawType propertyConfigurator, string key, string value)
|
||||
{
|
||||
}
|
||||
|
||||
public static void SetEventProperty(RawType propertyConfigurator, string key, DateTime value)
|
||||
{
|
||||
}
|
||||
|
||||
public static void SetEventProperty(RawType propertyConfigurator, string key, long value)
|
||||
{
|
||||
}
|
||||
|
||||
public static void SetEventProperty(RawType propertyConfigurator, string key, double value)
|
||||
{
|
||||
}
|
||||
|
||||
public static void SetEventProperty(RawType propertyConfigurator, string key, bool value)
|
||||
{
|
||||
}
|
||||
|
||||
public static void RemoveEventProperty(RawType propertyConfigurator, string key)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 09033f50c9aa64a7bae8097136a84d14
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,75 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
#if (!UNITY_IOS && !UNITY_ANDROID && !UNITY_WSA_10_0) || UNITY_EDITOR
|
||||
using Microsoft.AppCenter.Unity.Analytics.Internal;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Microsoft.AppCenter.Unity.Analytics
|
||||
{
|
||||
#if UNITY_IOS
|
||||
using RawType = System.IntPtr;
|
||||
#elif UNITY_ANDROID
|
||||
using RawType = UnityEngine.AndroidJavaObject;
|
||||
#else
|
||||
using RawType = System.Object;
|
||||
#endif
|
||||
|
||||
public class TransmissionTargetInternal
|
||||
{
|
||||
public static void TrackEvent(RawType transmissionTarget, string eventName)
|
||||
{
|
||||
}
|
||||
|
||||
public static void TrackEvent(RawType transmissionTarget, string eventName, int flags)
|
||||
{
|
||||
}
|
||||
|
||||
public static void TrackEventWithProperties(RawType transmissionTarget, string eventName, IDictionary<string, string> properties)
|
||||
{
|
||||
}
|
||||
|
||||
public static void TrackEventWithProperties(RawType transmissionTarget, string eventName, EventProperties properties)
|
||||
{
|
||||
}
|
||||
|
||||
public static void TrackEventWithProperties(RawType transmissionTarget, string eventName, IDictionary<string, string> properties, int flags)
|
||||
{
|
||||
}
|
||||
|
||||
public static void TrackEventWithProperties(RawType transmissionTarget, string eventName, EventProperties properties, int flags)
|
||||
{
|
||||
}
|
||||
|
||||
public static AppCenterTask SetEnabledAsync(RawType transmissionTarget, bool enabled)
|
||||
{
|
||||
return AppCenterTask.FromCompleted();
|
||||
}
|
||||
|
||||
public static AppCenterTask<bool> IsEnabledAsync(RawType transmissionTarget)
|
||||
{
|
||||
return AppCenterTask<bool>.FromCompleted(false);
|
||||
}
|
||||
|
||||
public static RawType GetTransmissionTarget(RawType transmissionTargetParent, string transmissionTargetToken, out bool success)
|
||||
{
|
||||
success = false;
|
||||
return default(RawType);
|
||||
}
|
||||
|
||||
public static RawType GetPropertyConfigurator(RawType transmissionTargetParent)
|
||||
{
|
||||
return default(RawType);
|
||||
}
|
||||
|
||||
public static void Pause(RawType transmissionTargetParent)
|
||||
{
|
||||
}
|
||||
|
||||
public static void Resume(RawType transmissionTargetParent)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 619352a0db14645c2a7441de0d98e790
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7c61caec9e69a40ae90907778a8ccc69
|
||||
folderAsset: yes
|
||||
timeCreated: 1503941147
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,120 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.AppCenter.Unity.Analytics.Internal;
|
||||
|
||||
namespace Microsoft.AppCenter.Unity.Analytics
|
||||
{
|
||||
#if UNITY_IOS || UNITY_ANDROID
|
||||
using RawType = System.IntPtr;
|
||||
#else
|
||||
using RawType = System.Type;
|
||||
#endif
|
||||
|
||||
public class Analytics
|
||||
{
|
||||
// Used by App Center Unity Editor Extensions: https://github.com/Microsoft/AppCenter-SDK-Unity-Extension
|
||||
public const string AnalyticsSDKVersion = "4.3.0";
|
||||
|
||||
public static void PrepareEventHandlers()
|
||||
{
|
||||
AnalyticsInternal.PrepareEventHandlers();
|
||||
}
|
||||
|
||||
public static void AddNativeType(List<RawType> nativeTypes)
|
||||
{
|
||||
AnalyticsInternal.AddNativeType(nativeTypes);
|
||||
}
|
||||
|
||||
public static void TrackEvent(string eventName)
|
||||
{
|
||||
AnalyticsInternal.TrackEvent(eventName);
|
||||
}
|
||||
|
||||
public static void TrackEvent(string eventName, Flags flags)
|
||||
{
|
||||
AnalyticsInternal.TrackEvent(eventName, (int)flags);
|
||||
}
|
||||
|
||||
public static void TrackEvent(string eventName, IDictionary<string, string> properties)
|
||||
{
|
||||
if (properties == null)
|
||||
{
|
||||
TrackEvent(eventName);
|
||||
}
|
||||
else
|
||||
{
|
||||
AnalyticsInternal.TrackEventWithProperties(eventName, properties);
|
||||
}
|
||||
}
|
||||
|
||||
public static void TrackEvent(string eventName, IDictionary<string, string> properties, Flags flags)
|
||||
{
|
||||
if (properties == null)
|
||||
{
|
||||
TrackEvent(eventName, flags);
|
||||
}
|
||||
else
|
||||
{
|
||||
AnalyticsInternal.TrackEventWithProperties(eventName, properties, (int)flags);
|
||||
}
|
||||
}
|
||||
|
||||
public static void TrackEvent(string eventName, EventProperties properties)
|
||||
{
|
||||
if (properties == null)
|
||||
{
|
||||
TrackEvent(eventName);
|
||||
}
|
||||
else
|
||||
{
|
||||
AnalyticsInternal.TrackEventWithProperties(eventName, properties);
|
||||
}
|
||||
}
|
||||
|
||||
public static void TrackEvent(string eventName, EventProperties properties, Flags flags)
|
||||
{
|
||||
if (properties == null)
|
||||
{
|
||||
TrackEvent(eventName, flags);
|
||||
}
|
||||
else
|
||||
{
|
||||
AnalyticsInternal.TrackEventWithProperties(eventName, properties, (int)flags);
|
||||
}
|
||||
}
|
||||
|
||||
public static AppCenterTask<bool> IsEnabledAsync()
|
||||
{
|
||||
return AnalyticsInternal.IsEnabledAsync();
|
||||
}
|
||||
|
||||
public static AppCenterTask SetEnabledAsync(bool enabled)
|
||||
{
|
||||
return AnalyticsInternal.SetEnabledAsync(enabled);
|
||||
}
|
||||
|
||||
public static TransmissionTarget GetTransmissionTarget(string transmissionTargetToken)
|
||||
{
|
||||
if (string.IsNullOrEmpty(transmissionTargetToken))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
bool success;
|
||||
var internalObject = AnalyticsInternal.GetTransmissionTarget(transmissionTargetToken, out success);
|
||||
return success ? new TransmissionTarget(internalObject) : null;
|
||||
}
|
||||
|
||||
public static void Pause()
|
||||
{
|
||||
AnalyticsInternal.Pause();
|
||||
}
|
||||
|
||||
public static void Resume()
|
||||
{
|
||||
AnalyticsInternal.Resume();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fd0e9bac2bb4245b3b6cd71e07030c30
|
||||
timeCreated: 1497463739
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,64 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.AppCenter.Unity.Analytics.Internal;
|
||||
|
||||
namespace Microsoft.AppCenter.Unity.Analytics
|
||||
{
|
||||
#if UNITY_IOS
|
||||
using RawType = System.IntPtr;
|
||||
#elif UNITY_ANDROID
|
||||
using RawType = UnityEngine.AndroidJavaObject;
|
||||
#elif UNITY_WSA_10_0 && !UNITY_EDITOR
|
||||
using RawType = Dictionary<string, string>;
|
||||
#else
|
||||
using RawType = System.Object;
|
||||
#endif
|
||||
|
||||
public class EventProperties
|
||||
{
|
||||
private readonly RawType _rawObject;
|
||||
|
||||
internal RawType GetRawObject()
|
||||
{
|
||||
return _rawObject;
|
||||
}
|
||||
|
||||
public EventProperties()
|
||||
{
|
||||
_rawObject = EventPropertiesInternal.Create();
|
||||
}
|
||||
|
||||
public EventProperties Set(string key, string val)
|
||||
{
|
||||
EventPropertiesInternal.SetString(_rawObject, key, val);
|
||||
return this;
|
||||
}
|
||||
|
||||
public EventProperties Set(string key, DateTime val)
|
||||
{
|
||||
EventPropertiesInternal.SetDate(_rawObject, key, val);
|
||||
return this;
|
||||
}
|
||||
|
||||
public EventProperties Set(string key, long val)
|
||||
{
|
||||
EventPropertiesInternal.SetNumber(_rawObject, key, val);
|
||||
return this;
|
||||
}
|
||||
|
||||
public EventProperties Set(string key, double val)
|
||||
{
|
||||
EventPropertiesInternal.SetNumber(_rawObject, key, val);
|
||||
return this;
|
||||
}
|
||||
|
||||
public EventProperties Set(string key, bool val)
|
||||
{
|
||||
EventPropertiesInternal.SetBool(_rawObject, key, val);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 004bef03efe4b5e498ec3de493d64e96
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,24 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.AppCenter.Unity.Analytics
|
||||
{
|
||||
/// <summary>
|
||||
/// Persistence and latency flags for telemetry.
|
||||
/// </summary>
|
||||
[Flags]
|
||||
public enum Flags
|
||||
{
|
||||
/// <summary>
|
||||
/// An event can be lost due to low bandwidth or disk space constraints.
|
||||
/// </summary>
|
||||
PersistenceNormal = 0x01,
|
||||
|
||||
/// <summary>
|
||||
/// Used for events that should be prioritized over non-critical events.
|
||||
/// </summary>
|
||||
PersistenceCritical = 0x02
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2beeb33194756f94ea1a4d58e51de1b9
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,87 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using Microsoft.AppCenter.Unity.Analytics.Internal;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Microsoft.AppCenter.Unity.Analytics
|
||||
{
|
||||
#if UNITY_IOS
|
||||
using RawType = System.IntPtr;
|
||||
#elif UNITY_ANDROID
|
||||
using RawType = UnityEngine.AndroidJavaObject;
|
||||
#else
|
||||
using RawType = System.Object;
|
||||
#endif
|
||||
|
||||
public class PropertyConfigurator
|
||||
{
|
||||
private readonly RawType _rawObject;
|
||||
|
||||
internal RawType GetRawObject()
|
||||
{
|
||||
return _rawObject;
|
||||
}
|
||||
|
||||
public PropertyConfigurator(RawType rawObject)
|
||||
{
|
||||
_rawObject = rawObject;
|
||||
}
|
||||
|
||||
public void SetAppName(string appName)
|
||||
{
|
||||
PropertyConfiguratorInternal.SetAppName(_rawObject, appName);
|
||||
}
|
||||
|
||||
public void SetAppVersion(string appVersion)
|
||||
{
|
||||
PropertyConfiguratorInternal.SetAppVersion(_rawObject, appVersion);
|
||||
}
|
||||
|
||||
public void SetAppLocale(string appLocale)
|
||||
{
|
||||
PropertyConfiguratorInternal.SetAppLocale(_rawObject, appLocale);
|
||||
}
|
||||
|
||||
public void SetEventProperty(string key, string value)
|
||||
{
|
||||
PropertyConfiguratorInternal.SetEventProperty(_rawObject, key, value);
|
||||
}
|
||||
|
||||
public void SetEventProperty(string key, DateTime value)
|
||||
{
|
||||
PropertyConfiguratorInternal.SetEventProperty(_rawObject, key, value);
|
||||
}
|
||||
|
||||
public void SetEventProperty(string key, long value)
|
||||
{
|
||||
PropertyConfiguratorInternal.SetEventProperty(_rawObject, key, value);
|
||||
}
|
||||
|
||||
public void SetEventProperty(string key, double value)
|
||||
{
|
||||
PropertyConfiguratorInternal.SetEventProperty(_rawObject, key, value);
|
||||
}
|
||||
|
||||
public void SetEventProperty(string key, bool value)
|
||||
{
|
||||
PropertyConfiguratorInternal.SetEventProperty(_rawObject, key, value);
|
||||
}
|
||||
|
||||
public void SetUserId(string userId)
|
||||
{
|
||||
PropertyConfiguratorInternal.SetUserId(_rawObject, userId);
|
||||
}
|
||||
|
||||
public void RemoveEventProperty(string key)
|
||||
{
|
||||
PropertyConfiguratorInternal.RemoveEventProperty(_rawObject, key);
|
||||
}
|
||||
|
||||
public void CollectDeviceId()
|
||||
{
|
||||
PropertyConfiguratorInternal.CollectDeviceId(_rawObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 55fb0e0927ff24e679c9231f38c6d0ab
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,126 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using Microsoft.AppCenter.Unity.Analytics.Internal;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Microsoft.AppCenter.Unity.Analytics
|
||||
{
|
||||
#if UNITY_IOS
|
||||
using RawType = System.IntPtr;
|
||||
#elif UNITY_ANDROID
|
||||
using RawType = UnityEngine.AndroidJavaObject;
|
||||
#else
|
||||
using RawType = System.Object;
|
||||
#endif
|
||||
|
||||
public class TransmissionTarget
|
||||
{
|
||||
private readonly RawType _rawObject;
|
||||
|
||||
internal RawType GetRawObject()
|
||||
{
|
||||
return _rawObject;
|
||||
}
|
||||
|
||||
public TransmissionTarget(RawType rawObject)
|
||||
{
|
||||
_rawObject = rawObject;
|
||||
}
|
||||
|
||||
public void TrackEvent(string eventName)
|
||||
{
|
||||
TransmissionTargetInternal.TrackEvent(_rawObject, eventName);
|
||||
}
|
||||
|
||||
public void TrackEvent(string eventName, Flags flags)
|
||||
{
|
||||
TransmissionTargetInternal.TrackEvent(_rawObject, eventName, (int)flags);
|
||||
}
|
||||
|
||||
public void TrackEvent(string eventName, IDictionary<string, string> properties)
|
||||
{
|
||||
if (properties == null)
|
||||
{
|
||||
TrackEvent(eventName);
|
||||
}
|
||||
else
|
||||
{
|
||||
TransmissionTargetInternal.TrackEventWithProperties(_rawObject, eventName, properties);
|
||||
}
|
||||
}
|
||||
|
||||
public void TrackEvent(string eventName, IDictionary<string, string> properties, Flags flags)
|
||||
{
|
||||
if (properties == null)
|
||||
{
|
||||
TrackEvent(eventName, flags);
|
||||
}
|
||||
else
|
||||
{
|
||||
TransmissionTargetInternal.TrackEventWithProperties(_rawObject, eventName, properties, (int)flags);
|
||||
}
|
||||
}
|
||||
|
||||
public void TrackEvent(string eventName, EventProperties properties)
|
||||
{
|
||||
if (properties == null)
|
||||
{
|
||||
TrackEvent(eventName);
|
||||
}
|
||||
else
|
||||
{
|
||||
TransmissionTargetInternal.TrackEventWithProperties(_rawObject, eventName, properties);
|
||||
}
|
||||
}
|
||||
|
||||
public void TrackEvent(string eventName, EventProperties properties, Flags flags)
|
||||
{
|
||||
if (properties == null)
|
||||
{
|
||||
TrackEvent(eventName, flags);
|
||||
}
|
||||
else
|
||||
{
|
||||
TransmissionTargetInternal.TrackEventWithProperties(_rawObject, eventName, properties, (int)flags);
|
||||
}
|
||||
}
|
||||
|
||||
public AppCenterTask<bool> IsEnabledAsync()
|
||||
{
|
||||
return TransmissionTargetInternal.IsEnabledAsync(_rawObject);
|
||||
}
|
||||
|
||||
public AppCenterTask SetEnabledAsync(bool enabled)
|
||||
{
|
||||
return TransmissionTargetInternal.SetEnabledAsync(_rawObject, enabled);
|
||||
}
|
||||
|
||||
public TransmissionTarget GetTransmissionTarget(string childTransmissionTargetToken)
|
||||
{
|
||||
if (string.IsNullOrEmpty(childTransmissionTargetToken))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
bool success;
|
||||
var internalObject = TransmissionTargetInternal.GetTransmissionTarget(_rawObject, childTransmissionTargetToken, out success);
|
||||
return success ? new TransmissionTarget(internalObject) : null;
|
||||
}
|
||||
|
||||
public PropertyConfigurator GetPropertyConfigurator()
|
||||
{
|
||||
return new PropertyConfigurator(TransmissionTargetInternal.GetPropertyConfigurator(_rawObject));
|
||||
}
|
||||
|
||||
public void Pause()
|
||||
{
|
||||
TransmissionTargetInternal.Pause(_rawObject);
|
||||
}
|
||||
|
||||
public void Resume()
|
||||
{
|
||||
TransmissionTargetInternal.Resume(_rawObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 713452dbc18f44e7da0005d414778b9a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cef4f7e70caf5421c90c88fbceecc910
|
||||
folderAsset: yes
|
||||
timeCreated: 1499378836
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -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
|
||||
+11
@@ -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
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cef60ebaae8af49db8dc3de5394263ae
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: eac6a5c11600045b39d3063cb58cd244
|
||||
folderAsset: yes
|
||||
timeCreated: 1498059871
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,114 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
#if UNITY_IOS && !UNITY_EDITOR
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Microsoft.AppCenter.Unity.Analytics.Internal
|
||||
{
|
||||
class AnalyticsInternal
|
||||
{
|
||||
public static void PrepareEventHandlers()
|
||||
{
|
||||
}
|
||||
|
||||
public static void AddNativeType(List<IntPtr> nativeTypes)
|
||||
{
|
||||
nativeTypes.Add(appcenter_unity_analytics_get_type());
|
||||
}
|
||||
|
||||
public static void TrackEvent(string eventName)
|
||||
{
|
||||
appcenter_unity_analytics_track_event(eventName, (int)Flags.PersistenceNormal);
|
||||
}
|
||||
|
||||
public static void TrackEvent(string eventName, int flags)
|
||||
{
|
||||
appcenter_unity_analytics_track_event(eventName, flags);
|
||||
}
|
||||
|
||||
public static void TrackEventWithProperties(string eventName, EventProperties properties)
|
||||
{
|
||||
appcenter_unity_analytics_track_event_with_typed_properties(eventName, properties.GetRawObject(), (int)Flags.PersistenceNormal);
|
||||
}
|
||||
|
||||
public static void TrackEventWithProperties(string eventName, IDictionary<string, string> properties)
|
||||
{
|
||||
appcenter_unity_analytics_track_event_with_properties(eventName, properties.Keys.ToArray(), properties.Values.ToArray(), properties.Count, (int)Flags.PersistenceNormal);
|
||||
}
|
||||
|
||||
public static void TrackEventWithProperties(string eventName, EventProperties properties, int flags)
|
||||
{
|
||||
appcenter_unity_analytics_track_event_with_typed_properties(eventName, properties.GetRawObject(), flags);
|
||||
}
|
||||
|
||||
public static void TrackEventWithProperties(string eventName, IDictionary<string, string> properties, int flags)
|
||||
{
|
||||
appcenter_unity_analytics_track_event_with_properties(eventName, properties.Keys.ToArray(), properties.Values.ToArray(), properties.Count, flags);
|
||||
}
|
||||
|
||||
public static AppCenterTask SetEnabledAsync(bool isEnabled)
|
||||
{
|
||||
appcenter_unity_analytics_set_enabled(isEnabled);
|
||||
return AppCenterTask.FromCompleted();
|
||||
}
|
||||
|
||||
public static AppCenterTask<bool> IsEnabledAsync()
|
||||
{
|
||||
var isEnabled = appcenter_unity_analytics_is_enabled();
|
||||
return AppCenterTask<bool>.FromCompleted(isEnabled);
|
||||
}
|
||||
|
||||
public static IntPtr GetTransmissionTarget(string transmissionTargetToken, out bool success)
|
||||
{
|
||||
var target = appcenter_unity_analytics_transmission_target_for_token(transmissionTargetToken);
|
||||
success = target != IntPtr.Zero;
|
||||
return target;
|
||||
}
|
||||
|
||||
public static void Pause()
|
||||
{
|
||||
appcenter_unity_analytics_pause();
|
||||
}
|
||||
|
||||
public static void Resume()
|
||||
{
|
||||
appcenter_unity_analytics_resume();
|
||||
}
|
||||
|
||||
#region External
|
||||
|
||||
[DllImport("__Internal")]
|
||||
private static extern IntPtr appcenter_unity_analytics_get_type();
|
||||
|
||||
[DllImport("__Internal")]
|
||||
private static extern void appcenter_unity_analytics_track_event(string eventName, int flags);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
private static extern void appcenter_unity_analytics_track_event_with_properties(string eventName, string[] keys, string[] values, int count, int flags);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
private static extern void appcenter_unity_analytics_track_event_with_typed_properties(string eventName, IntPtr properties, int flags);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
private static extern void appcenter_unity_analytics_set_enabled(bool isEnabled);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
private static extern bool appcenter_unity_analytics_is_enabled();
|
||||
|
||||
[DllImport("__Internal")]
|
||||
private static extern IntPtr appcenter_unity_analytics_transmission_target_for_token(string transmissionTargetToken);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
private static extern void appcenter_unity_analytics_pause();
|
||||
|
||||
[DllImport("__Internal")]
|
||||
private static extern void appcenter_unity_analytics_resume();
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cc68bbbb6d6464cec8e7a070fc38b921
|
||||
timeCreated: 1497463657
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,65 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
#if UNITY_IOS && !UNITY_EDITOR
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Microsoft.AppCenter.Unity.Internal.Utility;
|
||||
|
||||
namespace Microsoft.AppCenter.Unity.Analytics.Internal
|
||||
{
|
||||
class EventPropertiesInternal
|
||||
{
|
||||
public static IntPtr Create()
|
||||
{
|
||||
return appcenter_unity_analytics_create_event_properties();
|
||||
}
|
||||
|
||||
public static void SetString(IntPtr properties, string key, string val)
|
||||
{
|
||||
appcenter_unity_analytics_event_properties_set_string(properties, key, val);
|
||||
}
|
||||
|
||||
public static void SetNumber(IntPtr properties, string key, long val)
|
||||
{
|
||||
appcenter_unity_analytics_event_properties_set_long(properties, key, val);
|
||||
}
|
||||
|
||||
public static void SetNumber(IntPtr properties, string key, double val)
|
||||
{
|
||||
appcenter_unity_analytics_event_properties_set_double(properties, key, val);
|
||||
}
|
||||
|
||||
public static void SetBool(IntPtr properties, string key, bool val)
|
||||
{
|
||||
appcenter_unity_analytics_event_properties_set_bool(properties, key, val);
|
||||
}
|
||||
|
||||
public static void SetDate(IntPtr properties, string key, DateTime val)
|
||||
{
|
||||
appcenter_unity_analytics_event_properties_set_date(properties, key, NSDateHelper.DateTimeConvert(val));
|
||||
}
|
||||
|
||||
#region External
|
||||
|
||||
[DllImport("__Internal")]
|
||||
private static extern IntPtr appcenter_unity_analytics_create_event_properties();
|
||||
|
||||
[DllImport("__Internal")]
|
||||
private static extern void appcenter_unity_analytics_event_properties_set_string(IntPtr properties, string key, string val);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
private static extern void appcenter_unity_analytics_event_properties_set_long(IntPtr properties, string key, long val);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
private static extern void appcenter_unity_analytics_event_properties_set_double(IntPtr properties, string key, double val);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
private static extern void appcenter_unity_analytics_event_properties_set_bool(IntPtr properties, string key, bool val);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
private static extern void appcenter_unity_analytics_event_properties_set_date(IntPtr properties, string key, IntPtr val);
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ebf8af998d139794cb3ce191795c70ac
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,109 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
#if UNITY_IOS && !UNITY_EDITOR
|
||||
using AOT;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using Microsoft.AppCenter.Unity.Internal.Utility;
|
||||
|
||||
namespace Microsoft.AppCenter.Unity.Analytics.Internal
|
||||
{
|
||||
public class PropertyConfiguratorInternal
|
||||
{
|
||||
public static void SetAppName(IntPtr propertyConfigurator, string appName)
|
||||
{
|
||||
appcenter_unity_property_configurator_set_app_name(propertyConfigurator, appName);
|
||||
}
|
||||
|
||||
public static void SetUserId(IntPtr propertyConfigurator, string userId)
|
||||
{
|
||||
appcenter_unity_property_configurator_set_user_id(propertyConfigurator, userId);
|
||||
}
|
||||
|
||||
public static void SetAppVersion(IntPtr propertyConfigurator, string appVersion)
|
||||
{
|
||||
appcenter_unity_property_configurator_set_app_version(propertyConfigurator, appVersion);
|
||||
}
|
||||
|
||||
public static void SetAppLocale(IntPtr propertyConfigurator, string appLocale)
|
||||
{
|
||||
appcenter_unity_property_configurator_set_app_locale(propertyConfigurator, appLocale);
|
||||
}
|
||||
|
||||
public static void SetEventProperty(IntPtr propertyConfigurator, string key, string value)
|
||||
{
|
||||
appcenter_unity_property_configurator_set_event_property(propertyConfigurator, key, value);
|
||||
}
|
||||
|
||||
public static void SetEventProperty(IntPtr propertyConfigurator, string key, DateTime value)
|
||||
{
|
||||
appcenter_unity_property_configurator_set_event_datetime_property(propertyConfigurator, key, NSDateHelper.DateTimeConvert(value));
|
||||
}
|
||||
|
||||
public static void SetEventProperty(IntPtr propertyConfigurator, string key, long value)
|
||||
{
|
||||
appcenter_unity_property_configurator_set_event_long_property(propertyConfigurator, key, value);
|
||||
}
|
||||
|
||||
public static void SetEventProperty(IntPtr propertyConfigurator, string key, double value)
|
||||
{
|
||||
appcenter_unity_property_configurator_set_event_double_property(propertyConfigurator, key, value);
|
||||
}
|
||||
|
||||
public static void SetEventProperty(IntPtr propertyConfigurator, string key, bool value)
|
||||
{
|
||||
appcenter_unity_property_configurator_set_event_bool_property(propertyConfigurator, key, value);
|
||||
}
|
||||
|
||||
public static void CollectDeviceId(IntPtr propertyConfigurator)
|
||||
{
|
||||
appcenter_unity_property_configurator_collect_device_id(propertyConfigurator);
|
||||
}
|
||||
|
||||
public static void RemoveEventProperty(IntPtr propertyConfigurator, string key)
|
||||
{
|
||||
appcenter_unity_property_configurator_remove_event_property(propertyConfigurator, key);
|
||||
}
|
||||
|
||||
#region External
|
||||
|
||||
[DllImport("__Internal")]
|
||||
private static extern void appcenter_unity_property_configurator_set_app_name(IntPtr propertyConfigurator, string appName);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
private static extern void appcenter_unity_property_configurator_set_user_id(IntPtr propertyConfigurator, string userId);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
private static extern void appcenter_unity_property_configurator_set_app_version(IntPtr propertyConfigurator, string appVersion);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
private static extern void appcenter_unity_property_configurator_set_app_locale(IntPtr propertyConfigurator, string appLocale);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
private static extern void appcenter_unity_property_configurator_set_event_property(IntPtr propertyConfigurator, string key, string value);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
private static extern void appcenter_unity_property_configurator_set_event_datetime_property(IntPtr propertyConfigurator, string key, IntPtr value);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
private static extern void appcenter_unity_property_configurator_set_event_long_property(IntPtr propertyConfigurator, string key, long value);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
private static extern void appcenter_unity_property_configurator_set_event_double_property(IntPtr propertyConfigurator, string key, double value);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
private static extern void appcenter_unity_property_configurator_set_event_bool_property(IntPtr propertyConfigurator, string key, bool value);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
private static extern void appcenter_unity_property_configurator_collect_device_id(IntPtr propertyConfigurator);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
private static extern void appcenter_unity_property_configurator_remove_event_property(IntPtr propertyConfigurator, string key);
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
#endif
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 118ac3c5fef534a808089752a140c8a4
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,110 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
#if UNITY_IOS && !UNITY_EDITOR
|
||||
using AOT;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Microsoft.AppCenter.Unity.Analytics.Internal
|
||||
{
|
||||
public class TransmissionTargetInternal
|
||||
{
|
||||
public static void TrackEvent(IntPtr transmissionTarget, string eventName)
|
||||
{
|
||||
appcenter_unity_transmission_target_track_event(transmissionTarget, eventName, (int)Flags.PersistenceNormal);
|
||||
}
|
||||
|
||||
public static void TrackEvent(IntPtr transmissionTarget, string eventName, int flags)
|
||||
{
|
||||
appcenter_unity_transmission_target_track_event(transmissionTarget, eventName, flags);
|
||||
}
|
||||
|
||||
public static void TrackEventWithProperties(IntPtr transmissionTarget, string eventName, IDictionary<string, string> properties)
|
||||
{
|
||||
appcenter_unity_transmission_target_track_event_with_props(transmissionTarget, eventName, properties.Keys.ToArray(), properties.Values.ToArray(), properties.Count, (int)Flags.PersistenceNormal);
|
||||
}
|
||||
|
||||
public static void TrackEventWithProperties(IntPtr transmissionTarget, string eventName, EventProperties properties)
|
||||
{
|
||||
appcenter_unity_transmission_target_track_event_with_typed_props(transmissionTarget, eventName, properties.GetRawObject(), (int)Flags.PersistenceNormal);
|
||||
}
|
||||
|
||||
public static void TrackEventWithProperties(IntPtr transmissionTarget, string eventName, IDictionary<string, string> properties, int flags)
|
||||
{
|
||||
appcenter_unity_transmission_target_track_event_with_props(transmissionTarget, eventName, properties.Keys.ToArray(), properties.Values.ToArray(), properties.Count, flags);
|
||||
}
|
||||
|
||||
public static void TrackEventWithProperties(IntPtr transmissionTarget, string eventName, EventProperties properties, int flags)
|
||||
{
|
||||
appcenter_unity_transmission_target_track_event_with_typed_props(transmissionTarget, eventName, properties.GetRawObject(), flags);
|
||||
}
|
||||
|
||||
public static AppCenterTask SetEnabledAsync(IntPtr transmissionTarget, bool enabled)
|
||||
{
|
||||
appcenter_unity_transmission_target_set_enabled(transmissionTarget, enabled);
|
||||
return AppCenterTask.FromCompleted();
|
||||
}
|
||||
|
||||
public static AppCenterTask<bool> IsEnabledAsync(IntPtr transmissionTarget)
|
||||
{
|
||||
bool isEnabled = appcenter_unity_transmission_target_is_enabled(transmissionTarget);
|
||||
return AppCenterTask<bool>.FromCompleted(isEnabled);
|
||||
}
|
||||
|
||||
public static IntPtr GetTransmissionTarget(IntPtr transmissionTargetParent, string transmissionTargetToken, out bool success)
|
||||
{
|
||||
var target = appcenter_unity_transmission_transmission_target_for_token(transmissionTargetParent, transmissionTargetToken);
|
||||
success = target != IntPtr.Zero;
|
||||
return target;
|
||||
}
|
||||
|
||||
public static IntPtr GetPropertyConfigurator(IntPtr transmissionTarget)
|
||||
{
|
||||
return appcenter_unity_transmission_get_property_configurator(transmissionTarget);
|
||||
}
|
||||
|
||||
public static void Pause(IntPtr transmissionTarget)
|
||||
{
|
||||
appcenter_unity_transmission_pause(transmissionTarget);
|
||||
}
|
||||
|
||||
public static void Resume(IntPtr transmissionTarget)
|
||||
{
|
||||
appcenter_unity_transmission_resume(transmissionTarget);
|
||||
}
|
||||
|
||||
#region External
|
||||
|
||||
[DllImport("__Internal")]
|
||||
private static extern void appcenter_unity_transmission_target_track_event(IntPtr transmissionTarget, string eventName, int flags);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
private static extern void appcenter_unity_transmission_target_track_event_with_props(IntPtr transmissionTarget, string eventName, string[] keys, string[] values, int count, int flags);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
private static extern void appcenter_unity_transmission_target_track_event_with_typed_props(IntPtr transmissionTarget, string eventName, IntPtr properties, int flags);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
private static extern void appcenter_unity_transmission_target_set_enabled(IntPtr transmissionTarget, bool enabled);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
private static extern bool appcenter_unity_transmission_target_is_enabled(IntPtr transmissionTarget);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
private static extern IntPtr appcenter_unity_transmission_transmission_target_for_token(IntPtr transmissionTargetParent, string transmissionTargetToken);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
private static extern IntPtr appcenter_unity_transmission_get_property_configurator(IntPtr transmissionTarget);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
private static extern void appcenter_unity_transmission_pause(IntPtr transmissionTarget);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
private static extern void appcenter_unity_transmission_resume(IntPtr transmissionTarget);
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
#endif
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cf780c8aecb2b4c2fa499bc69556e3e7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in new issue
Block a user