com.amanotes.gdk 0.2.7 → 0.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.2.8 - 2023-06-12]
4
+ ### Mute Appsflyer's init log on Editor
5
+ ### Clear analytics log in adapters
6
+ ### Check null event params before calling AddParam()
7
+ ### Export AmaPassport info
8
+
3
9
  ## [0.2.7 - 2023-06-09]
4
10
  ### Fix log single adapter
5
11
 
Binary file
Binary file
Binary file
Binary file
@@ -103,6 +103,7 @@ namespace Amanotes.Core
103
103
  public string idfa;
104
104
  public string gaid;
105
105
  public string idfv;
106
+ public string deviceUniqueId;
106
107
  }
107
108
 
108
109
  [Serializable]
@@ -327,7 +328,15 @@ namespace Amanotes.Core
327
328
  private static bool isInQueue;
328
329
 
329
330
  public static string AmaId => User.amaPassport.device.amaId;
330
-
331
+ public static string GAId => User.amaPassport.device.gaid;
332
+ public static string IDFA => User.amaPassport.device.idfa;
333
+ public static string IDFV => User.amaPassport.device.idfv;
334
+ public static string AndroidId => User.amaPassport.device.androidId;
335
+ public static string AmaDeviceId => User.amaPassport.device.amaDeviceId;
336
+ public static string IpAddress => User.amaPassport.device.ipAddress;
337
+ public static string Country => User.amaPassport.device.country;
338
+ public static string DeviceUniqueId => User.amaPassport.device.deviceUniqueId;
339
+
331
340
  internal static void Init()
332
341
  {
333
342
  var adapter = Adapter.GetSingleAdapter<IAmaPassportAdapter>();
@@ -413,6 +422,7 @@ namespace Amanotes.Core
413
422
  device.graphicsDeviceId = SystemInfo.graphicsDeviceID;
414
423
  device.graphicsDeviceVendorId = SystemInfo.graphicsDeviceVendorID;
415
424
  device.operatingSystem = SystemInfo.operatingSystem;
425
+ device.deviceUniqueId = SystemInfo.deviceUniqueIdentifier;
416
426
  if (Application.platform == RuntimePlatform.Android)
417
427
  device.androidId = SystemInfo.deviceUniqueIdentifier;
418
428
  else if (Application.platform == RuntimePlatform.IPhonePlayer) device.idfv = SystemInfo.deviceUniqueIdentifier;
@@ -93,12 +93,14 @@ namespace Amanotes.Core
93
93
 
94
94
  public static IEventParamsBuilder LogEvent(string eventName, Dictionary<string, object> parameters)
95
95
  {
96
+ if (parameters == null) return LogEvent(eventName);
96
97
  return LogEvent(eventName).AddParam(parameters);
97
98
  }
98
99
 
99
100
  public static IEventParamsBuilder LogEvent(string eventName, params (string, object)[] parameters)
100
101
  {
101
102
  IEventParamsBuilder result = LogEvent(eventName);
103
+ if (parameters == null) return result;
102
104
  for (var i = 0; i < parameters.Length; i++)
103
105
  {
104
106
  result.AddParam(parameters[i].Item1, parameters[i].Item2);
@@ -318,7 +320,7 @@ namespace Amanotes.Core
318
320
  string eventNameToSend = GetEventNameToSend(eventData.eventName, countInSession, totalCount);
319
321
  NormalizeEventName(ref eventNameToSend);
320
322
 
321
- if (showAnalyticsLog) Debug.Log($"[AmaGDK] Event <{eventNameToSend}> (in session: {countInSession}, total: {totalCount})\n" +
323
+ if (showAnalyticsLog) Debug.Log($"AmaGDK v{AmaGDK.VERSION} | Event <{eventNameToSend}> (in session: {countInSession}, total: {totalCount})\n" +
322
324
  $"Params:\n{JsonUtils.DictionaryToJson(eventData.parameters, true)}");
323
325
 
324
326
  var inUseAdapterIDs = new List<string>();
@@ -4,6 +4,7 @@ using System.Text;
4
4
  using UnityEngine;
5
5
  using UnityObject = UnityEngine.Object;
6
6
  using static Amanotes.Core.AmaGDK.Analytics;
7
+ using static Amanotes.Core.AmaGDK;
7
8
 
8
9
  #if UNITY_EDITOR
9
10
  using UnityEditor;
@@ -78,19 +79,19 @@ namespace Amanotes.Core.Internal
78
79
  if (string.IsNullOrEmpty(key)) key = message;
79
80
  if (logWarningDict.Contains(key)) return;
80
81
  logWarningDict.Add(key);
81
- Debug.LogWarning("[AmaGDK] " + message);
82
+ Debug.LogWarning($"AmaGDK v{VERSION} | {message}");
82
83
  }
83
84
  public static void LogWarning(string message)
84
85
  {
85
- Debug.LogWarning("[AmaGDK] " + message);
86
+ Debug.LogWarning($"AmaGDK v{VERSION} | {message}");
86
87
  }
87
88
  public static void LogError(string message)
88
89
  {
89
- Debug.LogError("[AmaGDK] " + message);
90
+ Debug.LogError($"AmaGDK v{VERSION} | {message}");
90
91
  }
91
92
  public static void Log(string message)
92
93
  {
93
- if (AmaGDK.Config.common.verboseLog) Debug.Log("[AmaGDK] " + message);
94
+ if (AmaGDK.Config.common.verboseLog) Debug.Log($"AmaGDK v{VERSION} | {message}");
94
95
  }
95
96
  }
96
97
 
package/Runtime/AmaGDK.cs CHANGED
@@ -9,7 +9,7 @@ namespace Amanotes.Core
9
9
  {
10
10
  public partial class AmaGDK : MonoBehaviour
11
11
  {
12
- public const string VERSION = "0.2.7";
12
+ public const string VERSION = "0.2.8";
13
13
 
14
14
  internal static AmaGDK _instance;
15
15
  internal static Status _status = Status.None;
@@ -106,7 +106,7 @@ namespace Amanotes.Core
106
106
  _status = Status.Ready;
107
107
  _onReadyCallback?.Invoke();
108
108
  _onReadyCallback = null;
109
- Debug.Log($"[AmaGDK] {READY}");
109
+ Debug.Log($"AmaGDK v{VERSION} | {READY}");
110
110
  }
111
111
 
112
112
  void RegisterUnityCallback(AdapterContext adapter)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "com.amanotes.gdk",
3
- "version": "0.2.7",
3
+ "version": "0.2.8",
4
4
  "displayName": "AmaGDK",
5
5
  "description": "Amanotes Game Development Kit",
6
6
  "unity": "2020.3",