This repository has been archived by the owner on Apr 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from yandexmobile/release-2.0.0
Update AppMetrica Unity Plugin 2.0.0
- Loading branch information
Showing
46 changed files
with
2,456 additions
and
1,400 deletions.
There are no files selected for viewing
Git LFS file not shown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
YandexMetricaPluginSample/Assets/AppMetrica/BaseYandexAppMetrica.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
using UnityEngine; | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
|
||
public abstract class BaseYandexAppMetrica : IYandexAppMetrica | ||
{ | ||
private YandexAppMetricaConfig? _metricaConfig; | ||
|
||
public event ConfigUpdateHandler OnActivation; | ||
|
||
public YandexAppMetricaConfig? ActivationConfig { | ||
get { | ||
return _metricaConfig; | ||
} | ||
} | ||
|
||
public virtual void ActivateWithAPIKey (string apiKey) | ||
{ | ||
UpdateConfiguration (new YandexAppMetricaConfig (apiKey)); | ||
} | ||
|
||
public virtual void ActivateWithConfiguration (YandexAppMetricaConfig config) | ||
{ | ||
UpdateConfiguration (config); | ||
} | ||
|
||
private void UpdateConfiguration (YandexAppMetricaConfig config) | ||
{ | ||
_metricaConfig = config; | ||
ConfigUpdateHandler receiver = OnActivation; | ||
if (receiver != null) { | ||
receiver (config); | ||
} | ||
} | ||
|
||
public abstract void OnResumeApplication (); | ||
|
||
public abstract void OnPauseApplication (); | ||
|
||
public abstract void ReportEvent (string message); | ||
|
||
public abstract void ReportEvent (string message, Dictionary<string, object> parameters); | ||
|
||
public abstract void ReportError (string condition, string stackTrace); | ||
|
||
public abstract void SetTrackLocationEnabled (bool enabled); | ||
|
||
public abstract void SetLocation (YandexAppMetricaConfig.Coordinates coordinates); | ||
|
||
public abstract void SetSessionTimeout (uint sessionTimeoutSeconds); | ||
|
||
public abstract void SetReportCrashesEnabled (bool enabled); | ||
|
||
public abstract void SetCustomAppVersion (string appVersion); | ||
|
||
public abstract void SetLoggingEnabled (); | ||
|
||
public abstract void SetEnvironmentValue (string key, string value); | ||
|
||
public abstract bool CollectInstalledApps { get; set; } | ||
|
||
public abstract string LibraryVersion { get; } | ||
|
||
public abstract int LibraryApiLevel { get; } | ||
|
||
} |
Oops, something went wrong.