com.amanotes.gdk 0.2.36 → 0.2.37

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,8 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.2.37 - 2023-11-21]
4
+ - Improve GDK logs
5
+ - Banner will not show when ad adapter is not ready
6
+ - Fix ama_device_id on Android
7
+
3
8
  ## [0.2.36 - 2023-11-15]
4
9
  - Add OnAdShowReadyStatus callback
5
- - Revive AdEventTracking
10
+ - Revamp AdEventTracking
6
11
 
7
12
  ## [0.2.35 - 2023-11-14]
8
13
  - [Fix] Save UserID
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -175,6 +175,12 @@ namespace Amanotes.Core
175
175
  _adConfig = ((AdapterContext)_adapter)?.GetAdapterConfig<AdAdapterConfig>();
176
176
  _adapter?.interstitial.StartLoadAd();
177
177
  _adapter?.rewardVideo.StartLoadAd();
178
+
179
+ if (_isBannerShowing)
180
+ {
181
+ _isBannerShowing = false;
182
+ ShowBanner(_showingBannerPosition);
183
+ }
178
184
  }
179
185
 
180
186
  public static bool HasInterstitial => _adapter.interstitial.hasAd;
@@ -245,19 +251,28 @@ namespace Amanotes.Core
245
251
  }
246
252
 
247
253
  private static bool _isBannerShowing;
254
+ private static BannerPosition? _showingBannerPosition = null;
255
+
248
256
  public static void ShowBanner(BannerPosition? bannerPosition = null)
249
257
  {
250
258
  if (_isBannerShowing) return;
251
259
  _isBannerShowing = true;
252
-
253
- if (bannerPosition.HasValue)
260
+ _showingBannerPosition = bannerPosition;
261
+
262
+ if (_adapter == null)
254
263
  {
255
- _adapter.ShowBanner(bannerPosition.Value);
264
+ //Debug.LogWarning("Adapter not found???");
265
+ return;
256
266
  }
257
- else
267
+
268
+ if (_adConfig == null)
258
269
  {
259
- _adapter.ShowBanner(_adConfig.bannerPosition);
270
+ //Debug.LogWarning("_adConfig not found???");
271
+ return;
260
272
  }
273
+
274
+ _showingBannerPosition = bannerPosition ?? _adConfig.bannerPosition;
275
+ _adapter.ShowBanner(_showingBannerPosition.Value);
261
276
  }
262
277
 
263
278
  public static void HideBanner()
@@ -289,7 +289,7 @@ namespace Amanotes.Core
289
289
  string eventNameToSend = GetEventNameToSend(eventData.eventName, countInSession, totalCount);
290
290
  if (common.normalizeEventName) NormalizeEventName(ref eventNameToSend);
291
291
 
292
- if (showAnalyticsLog) Debug.Log($"AmaGDK | Event <{eventNameToSend}> (in session: {countInSession}, total: {totalCount})\n{JsonUtils.DictionaryToJson(eventData.parameters, true)}");
292
+ if (showAnalyticsLog) Debug.Log($"AmaGDK | [Analytics] Event <{eventNameToSend}> (in session: {countInSession}, total: {totalCount})\n{JsonUtils.DictionaryToJson(eventData.parameters, true)}");
293
293
 
294
294
  common.quality.CheckEventQuality(eventData.eventName, eventData.parameters);
295
295
 
@@ -721,7 +721,7 @@ namespace Amanotes.Core
721
721
 
722
722
  private static bool IsValidKeyValue(IEventParamsBuilder ap, string key, object value)
723
723
  {
724
- string eventName = (ap as EventParams).eventName;
724
+ string eventName = (ap as EventParams)?.eventName;
725
725
  if (string.IsNullOrWhiteSpace(key))
726
726
  {
727
727
  LogWarning($"Param key is empty. Event name: {eventName}!");
@@ -729,7 +729,7 @@ namespace Amanotes.Core
729
729
  }
730
730
  if (value == null)
731
731
  {
732
- LogWarning($"Param value is null. Event name: {eventName}!");
732
+ LogWarning($"Param value of key <{key}> is null. Event name: {eventName}!");
733
733
  return false;
734
734
  }
735
735
 
@@ -72,11 +72,23 @@ namespace Amanotes.Core
72
72
  set => _pseudoId = ValidateId(value, ALPHANUMERIC_PATTERN);
73
73
  }
74
74
 
75
+ #if UNITY_IOS
75
76
  public string AmaDeviceId
76
77
  {
77
78
  get => _amaDeviceId;
78
79
  set => _amaDeviceId = ValidateId(value, ALPHANUMERIC_HYPHEN_PATTERN);
79
80
  }
81
+ #endif
82
+
83
+ #if UNITY_ANDROID
84
+ public string AmaDeviceId
85
+ {
86
+ get => _amaDeviceId;
87
+ set => _amaDeviceId = ValidateId(value, ALPHANUMERIC_PATTERN);
88
+ }
89
+ #endif
90
+
91
+
80
92
 
81
93
  public string AppsFlyerId
82
94
  {
@@ -132,7 +144,7 @@ namespace Amanotes.Core
132
144
  yield return waitForDuration;
133
145
  time += WAIT_TIME;
134
146
  if (time <= TIME_OUT) continue;
135
- Logging.LogWarning($"User init time out: {TIME_OUT}");
147
+ Logging.LogWarning($"| UserProfile <init> timeout: {TIME_OUT} (ama_device_id not exist)");
136
148
  break;
137
149
  }
138
150
  }
package/Runtime/AmaGDK.cs CHANGED
@@ -14,7 +14,7 @@ namespace Amanotes.Core
14
14
  {
15
15
  public partial class AmaGDK : MonoBehaviour
16
16
  {
17
- public const string VERSION = "0.2.36";
17
+ public const string VERSION = "0.2.37";
18
18
 
19
19
  internal static AmaGDK _instance;
20
20
  internal static Status _status = Status.None;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "com.amanotes.gdk",
3
- "version": "0.2.36",
3
+ "version": "0.2.37",
4
4
  "displayName": "AmaGDK",
5
5
  "description": "Amanotes Game Development Kit",
6
6
  "unity": "2019.4",