com.amanotes.gdk 0.2.84 → 0.2.85

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,3 +1,6 @@
1
+ ## [0.2.85] - 2025-03-18
2
+ - [Fix] Manage ad activity killed routine
3
+
1
4
  ## [0.2.84] - 2025-03-17
2
5
  - [Fix] Attach JNI thread
3
6
 
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -28,6 +28,7 @@ namespace Amanotes.Core.Internal
28
28
  }
29
29
 
30
30
  internal GDKRoutine _loadRoutine;
31
+ private GDKRoutine _handleAdActivityKilledRoutine;
31
32
 
32
33
  public void StartLoadAd()
33
34
  {
@@ -180,6 +181,7 @@ namespace Amanotes.Core.Internal
180
181
 
181
182
  IEnumerator ShowAdRoutine()
182
183
  {
184
+ StopHandleAdActivityKilledRoutine();
183
185
  // Wait to end frame so that all AdCallbacks finish registering
184
186
  yield return new WaitForEndOfFrame();
185
187
 
@@ -222,7 +224,7 @@ namespace Amanotes.Core.Internal
222
224
  OnAdShowReadyStatus(true, AdShowReadyStatus.Ready);
223
225
  TriggerBeforeAdShow();
224
226
  #if !UNITY_EDITOR && UNITY_ANDROID
225
- GDKUtils.StartCoroutine(HandleAdActivityKilledSilently());
227
+ _handleAdActivityKilledRoutine = GDKUtils.StartCoroutine(HandleAdActivityKilledSilently());
226
228
  #endif
227
229
  ShowAd();
228
230
  yield return WaitForMediationCallback();
@@ -272,6 +274,14 @@ namespace Amanotes.Core.Internal
272
274
  }
273
275
  unityCallbacks.OnApplicationFocus -= onApplicationFocusCallback;
274
276
  }
277
+
278
+ private void StopHandleAdActivityKilledRoutine()
279
+ {
280
+ if (_handleAdActivityKilledRoutine == null) return;
281
+ _handleAdActivityKilledRoutine.StopRoutine();
282
+ _handleAdActivityKilledRoutine = null;
283
+ Log("[Ad] HandleAdActivityKilledSilently routine canceled.");
284
+ }
275
285
 
276
286
  private void EndShowAdRoutineWithFailure(AdShowReadyStatus status)
277
287
  {
@@ -310,6 +320,7 @@ namespace Amanotes.Core.Internal
310
320
 
311
321
  private void ShowAdRoutineCompleted(bool isSuccess)
312
322
  {
323
+ StopHandleAdActivityKilledRoutine();
313
324
  if (_loadState == LoadAdsState.Ready)
314
325
  {
315
326
  _loadState = isAdReady ? LoadAdsState.Ready : LoadAdsState.None;
package/Runtime/AmaGDK.cs CHANGED
@@ -27,7 +27,7 @@ namespace Amanotes.Core
27
27
  {
28
28
  public partial class AmaGDK : MonoBehaviour
29
29
  {
30
- public const string VERSION = "0.2.84";
30
+ public const string VERSION = "0.2.85";
31
31
 
32
32
  internal static Status _status = Status.None;
33
33
  internal static ConfigAsset _config = null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "com.amanotes.gdk",
3
- "version": "0.2.84",
3
+ "version": "0.2.85",
4
4
  "displayName": "AmaGDK",
5
5
  "description": "Amanotes Game Development Kit",
6
6
  "unity": "2020.3",