void OnApplicationPause(bool status) { if (status) { pauseTime = Time.realtimeSinceStartup; } else { #if UNITY_ANDROID if (!UserPrefs.isIgnoreAds && !UserPrefs.isAmazonBuild) { Upsight.requestAppOpen(); } #endif timeDifference = Time.realtimeSinceStartup - pauseTime; if (timeDifference >= timeLimit) { Debug.Log("Change the state"); if (!UserPrefs.isIgnoreAds && !UserPrefs.isAmazonBuild) { Upsight.sendContentRequest("game_resume", true); } } } }
public static void purgeLocation() { if (!Upsight.initSuccessful()) { return; } Upsight._pluginBase.Call(nameof(purgeLocation), new object[0]); }
void OnApplicationPause(bool pauseStatus) { // session tracking requires that you call requestAppOpen every time your app is launched if (!pauseStatus) { Upsight.requestAppOpen(); } }
public static void onResume() { if (!Upsight.initSuccessful()) { return; } Upsight._pluginBase.Call("onApplicationResumed", new object[0]); }
public static long getLatestSessionStartTimestamp() { if (!Upsight.initSuccessful()) { return(0); } return((long)Upsight._pluginBase.Call <long>(nameof(getLatestSessionStartTimestamp), new object[0])); }
public static void unregisterForPushNotifications() { if (!Upsight.initSuccessful() || Upsight._pluginPushExtension == null) { return; } Upsight._pluginPushExtension.Call(nameof(unregisterForPushNotifications), new object[0]); }
public static bool getOptOutStatus() { if (!Upsight.initSuccessful()) { return(false); } return((bool)Upsight._pluginBase.Call <bool>(nameof(getOptOutStatus), new object[0])); }
public static string getSid() { if (!Upsight.initSuccessful()) { return((string)null); } return((string)Upsight._pluginBase.Call <string>(nameof(getSid), new object[0])); }
public static int getLatestSessionNumber() { if (!Upsight.initSuccessful()) { return(0); } return((int)Upsight._pluginBase.Call <int>(nameof(getLatestSessionNumber), new object[0])); }
public static DateTime getUserAttributeDate(string key) { if (!Upsight.initSuccessful()) { return(new DateTime()); } return(((long)Upsight._pluginBase.Call <long>("getUserAttributesDatetime", new object[1] { (object)key })).ToDateTime()); }
public static bool getUserAttributeBool(string key) { if (!Upsight.initSuccessful()) { return(false); } return((bool)Upsight._pluginBase.Call <bool>("getUserAttributesBool", new object[1] { (object)key })); }
public static int getUserAttributeInt(string key) { if (!Upsight.initSuccessful()) { return(0); } return((int)Upsight._pluginBase.Call <int>("getUserAttributesInt", new object[1] { (object)key })); }
public static float getUserAttributeFloat(string key) { if (!Upsight.initSuccessful()) { return(0.0f); } return((float)Upsight._pluginBase.Call <float>("getUserAttributesFloat", new object[1] { (object)key })); }
public static string getUserAttributeString(string key) { if (!Upsight.initSuccessful()) { return((string)null); } return((string)Upsight._pluginBase.Call <string>("getUserAttributesString", new object[1] { (object)key })); }
public static void setOptOutStatus(bool optOutStatus) { if (!Upsight.initSuccessful()) { return; } Upsight._pluginBase.Call(nameof(setOptOutStatus), new object[1] { (object)optOutStatus }); }
public static void setLoggerLevel(UpsightLoggerLevel loggerLevel) { if (!Upsight.initSuccessful()) { return; } Upsight._pluginBase.Call(nameof(setLoggerLevel), new object[1] { (object)loggerLevel.ToString().ToUpper() }); }
private void OnApplicationPause(bool paused) { if (paused) { Upsight.onPause(); } else { Upsight.onResume(); } }
public static int getManagedInt(string key) { if (!Upsight.initSuccessful()) { return(0); } return((int)Upsight._pluginBase.Call <int>(nameof(getManagedInt), new object[1] { (object)key })); }
public static bool getManagedBool(string key) { if (!Upsight.initSuccessful()) { return(false); } return((bool)Upsight._pluginBase.Call <bool>(nameof(getManagedBool), new object[1] { (object)key })); }
public static string getManagedString(string key) { if (!Upsight.initSuccessful()) { return((string)null); } return((string)Upsight._pluginBase.Call <string>(nameof(getManagedString), new object[1] { (object)key })); }
public static float getManagedFloat(string key) { if (!Upsight.initSuccessful()) { return(0.0f); } return((float)Upsight._pluginBase.Call <float>(nameof(getManagedFloat), new object[1] { (object)key })); }
public static void destroyBillboard(string scope) { if (!Upsight.initSuccessful() || Upsight._pluginMarketingExtension == null) { return; } Upsight._pluginMarketingExtension.Call(nameof(destroyBillboard), new object[1] { (object)scope }); }
public static bool isContentReadyForBillboardWithScope(string scope) { if (!Upsight.initSuccessful() || Upsight._pluginMarketingExtension == null) { return(false); } return((bool)Upsight._pluginMarketingExtension.Call <bool>(nameof(isContentReadyForBillboardWithScope), new object[1] { (object)scope })); }
public static void setUserAttributeBool(string key, bool value) { if (!Upsight.initSuccessful()) { return; } Upsight._pluginBase.Call("setUserAttributesBool", new object[2] { (object)key, (object)value }); }
public static void recordMilestoneEvent(string scope, Dictionary <string, object> properties = null) { if (!Upsight.initSuccessful()) { return; } Upsight._pluginBase.Call(nameof(recordMilestoneEvent), new object[2] { (object)scope, properties == null ? (object)(string)null : (object)Json.Serialize((object)properties) }); }
public static void recordCustomEvent(string eventName, Dictionary <string, object> properties = null) { if (!Upsight.initSuccessful()) { return; } Upsight._pluginBase.Call("recordAnalyticsEvent", new object[2] { (object)eventName, properties == null ? (object)(string)null : (object)Json.Serialize((object)properties) }); }
public static void setLocation(double lat, double lon) { if (!Upsight.initSuccessful()) { return; } Upsight._pluginBase.Call(nameof(setLocation), new object[2] { (object)lat, (object)lon }); }
public static void setUserAttributeDate(string key, DateTime value) { if (!Upsight.initSuccessful()) { return; } long unixTimestamp = value.ToUnixTimestamp(); Upsight._pluginBase.Call("setUserAttributesDatetime", new object[2] { (object)key, (object)unixTimestamp }); }
public static void recordAttributionEvent(string campaign, string creative, string source, Dictionary <string, object> properties = null) { if (!Upsight.initSuccessful()) { return; } Upsight._pluginBase.Call(nameof(recordAttributionEvent), new object[4] { (object)campaign, (object)creative, (object)source, properties == null ? (object)(string)null : (object)Json.Serialize((object)properties) }); }
void Start() { #if UNITY_ANDROID Upsight.init(androidAppToken, androidAppSecret, gcmProjectNumber); #else Upsight.init(iosAppToken, iosAppSecret); #endif Upsight.requestAppOpen(); if (registerForPushNotifications) { Upsight.registerForPushNotifications(); } }