com.amanotes.gdk 0.2.65-6 → 0.2.66-2
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 +30 -0
- package/Editor/Extra/GDKAutoUpdateAdapter.cs +67 -0
- package/Editor/Extra/GDKAutoUpdateAdapter.cs.meta +11 -0
- package/Extra/AmaGDKInstaller.unitypackage +0 -0
- package/Extra/CheckDiskSpace.unitypackage +0 -0
- package/Extra/ForceUpdate.unitypackage +0 -0
- package/Extra/GoogleCMP.unitypackage +0 -0
- package/Extra/LegacyGDKUpdateHelper.unitypackage +0 -0
- package/Extra/LegacyGDKUpdateHelper.unitypackage.meta +7 -0
- package/Extra/PostProcessor.unitypackage +0 -0
- package/Packages/AmaGDKConfig.unitypackage +0 -0
- package/Packages/AmaGDKExample.unitypackage +0 -0
- package/Packages/AmaGDKTest.unitypackage +0 -0
- package/Packages/AppsFlyerAdapter.PurchaseConnector.unitypackage +0 -0
- package/Packages/AppsFlyerAdapter.unitypackage +0 -0
- package/Packages/FirebaseAnalyticsAdapter.unitypackage +0 -0
- package/Packages/FirebaseRemoteConfigAdapter.unitypackage +0 -0
- package/Packages/IronSourceAdapter.unitypackage +0 -0
- package/Packages/RevenueCatAdapter.unitypackage +0 -0
- package/Packages/SqliteAnalyticsAdapter.unitypackage +0 -0
- package/Runtime/Ad/AdExtension.cs +111 -0
- package/Runtime/Ad/AdExtension.cs.meta +3 -0
- package/Runtime/Ad/AdLogic.cs +531 -0
- package/Runtime/Ad/AdLogic.cs.meta +3 -0
- package/Runtime/Ad/AdModuleConfig.cs +39 -0
- package/Runtime/Ad/AdModuleConfig.cs.meta +3 -0
- package/Runtime/Ad/AdShowContext.cs +43 -0
- package/Runtime/Ad/AdShowContext.cs.meta +3 -0
- package/Runtime/Ad/AmaGDK.Ads.cs +383 -0
- package/Runtime/Ad.meta +8 -0
- package/Runtime/AmaGDK.Analytics.cs +37 -16
- package/Runtime/AmaGDK.Device.cs +105 -0
- package/Runtime/AmaGDK.Device.cs.meta +3 -0
- package/Runtime/AmaGDK.cs +2 -2
- package/Runtime/AudioToolkit/AmaGDK.Audio.cs +2 -0
- package/Runtime/AudioToolkit/Plugins/Android/{AudioDeviceDetector.java → GDKAudioDeviceDetector.java} +1 -1
- package/Runtime/AudioToolkit/Plugins/AudioDeviceDetector.cs +1 -1
- package/Runtime/Core/GDKPool.cs +37 -0
- package/Runtime/Core/GDKPool.cs.meta +3 -0
- package/Runtime/Core/GDKRoutine.cs +41 -17
- package/Runtime/GDKAudio/Plugins.meta +8 -0
- package/Runtime/GDKAudio.meta +8 -0
- package/Runtime/Internal/AmaGDK.Utils.cs +0 -26
- package/Runtime/UI.meta +8 -0
- package/package.json +1 -1
- package/Runtime/AmaGDK.Ads.cs +0 -1077
- /package/Runtime/{AmaGDK.Ads.cs.meta → Ad/AmaGDK.Ads.cs.meta} +0 -0
- /package/Runtime/AudioToolkit/Plugins/Android/{AudioDeviceDetector.java.meta → GDKAudioDeviceDetector.java.meta} +0 -0
- /package/Runtime/AudioToolkit/Plugins/iOS/{AudioDeviceDetector.mm → GDKAudioDeviceDetector.mm} +0 -0
- /package/Runtime/AudioToolkit/Plugins/iOS/{AudioDeviceDetector.mm.meta → GDKAudioDeviceDetector.mm.meta} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.2.66-2 - 2024-10-25]
|
|
4
|
+
- [Fix] Disable GDKAudio module
|
|
5
|
+
|
|
6
|
+
## [0.2.66 - 2024-06-25]
|
|
7
|
+
- [Dev] Verify all fields are reset in Init EventParams
|
|
8
|
+
- [Dev] Add try catch to prevent coroutines to stop silently
|
|
9
|
+
- [Fix] Reset 'isLoggedImmediately' for every new EventParams
|
|
10
|
+
- [Dev] Update Audio native plugin name
|
|
11
|
+
|
|
12
|
+
## [0.2.65-6 - 2024-06-20]
|
|
13
|
+
- [Dev] Improve SDK Version Tracking
|
|
14
|
+
- [Klavar] improve enum converter
|
|
15
|
+
- [Fix] Turn off Google CMP on Editor
|
|
16
|
+
|
|
3
17
|
## [0.2.65-5 - 2024-06-17]
|
|
4
18
|
- [Dev] Update for GDKTest Unity 2022.3 project
|
|
5
19
|
- [Dev] Update for GDKTest Unity 2021.3 project
|
|
@@ -12,6 +26,22 @@
|
|
|
12
26
|
- [Dev] Degrade GDKDev project to Unity 2020
|
|
13
27
|
- [Dev] Audio module supports Unity 2020
|
|
14
28
|
|
|
29
|
+
## [0.2.65-4 - 2024-06-14]
|
|
30
|
+
- [Dev] Audio module supports Unity 2020
|
|
31
|
+
- [Dev] Degrade GDKDev project to Unity 2020
|
|
32
|
+
|
|
33
|
+
## [0.2.65-3 - 2024-06-14]
|
|
34
|
+
- [Dev] Simplify LocalBuild + Minor editor fixes for GDK Analytics
|
|
35
|
+
- [Dev] fix PostBuild unity 2020
|
|
36
|
+
- [Dev] Audio Device Detector and Bluetooth Audio Latency
|
|
37
|
+
- [Dev] Update SDK configs
|
|
38
|
+
|
|
39
|
+
## [0.2.65-2 - 2024-06-13]
|
|
40
|
+
- [Feature] Implement analytics event correction for force kill app
|
|
41
|
+
- [Feature] Upload version tracking to Airtable
|
|
42
|
+
- [Fix] Unity 2020 compatible
|
|
43
|
+
- [Fix] Wrong condition check for first time remote config
|
|
44
|
+
|
|
15
45
|
## [0.2.65 - 2024-06-13]
|
|
16
46
|
- [Dev] Add GDKRoutine
|
|
17
47
|
- [Dev] Add option to preload banners
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
using Amanotes.Core.Internal;
|
|
2
|
+
using System;
|
|
3
|
+
using System.Collections.Generic;
|
|
4
|
+
using UnityEditor;
|
|
5
|
+
using UnityEngine;
|
|
6
|
+
|
|
7
|
+
namespace Amanotes.Editor
|
|
8
|
+
{
|
|
9
|
+
internal class GDKAutoUpdateAdapter: AssetPostprocessor
|
|
10
|
+
{
|
|
11
|
+
private static readonly Dictionary<string, string> packageMap = new Dictionary<string, string>()
|
|
12
|
+
{
|
|
13
|
+
{ "AmaGDKConfigAsset", $"{Res.AMAGDK_CONFIG_PACKAGE}" },
|
|
14
|
+
|
|
15
|
+
// Adapters
|
|
16
|
+
{ "AppsFlyerAdapter", $"{Res.PACKAGE_PATH}AppsFlyerAdapter.unitypackage" },
|
|
17
|
+
{ "FirebaseAnalyticsAdapter", $"{Res.PACKAGE_PATH}FirebaseAnalyticsAdapter.unitypackage" },
|
|
18
|
+
{ "FirebaseRemoteConfigAdapter", $"{Res.PACKAGE_PATH}FirebaseRemoteConfigAdapter.unitypackage" },
|
|
19
|
+
{ "IronSourceAdapter", $"{Res.PACKAGE_PATH}IronSourceAdapter.unitypackage" },
|
|
20
|
+
{ "RevenueCatAdapter", $"{Res.PACKAGE_PATH}RevenueCatAdapter.unitypackage" },
|
|
21
|
+
{ "SqliteAnalyticsAdapter", $"{Res.PACKAGE_PATH}SqliteAnalyticsAdapter.unitypackage" },
|
|
22
|
+
|
|
23
|
+
// Extra packages
|
|
24
|
+
{ "DiskSpacePopup", $"{Res.EXTRA_PATH}CheckDiskSpace.unitypackage" },
|
|
25
|
+
{ "ForceUpdatePopup", $"{Res.EXTRA_PATH}ForceUpdate.unitypackage" },
|
|
26
|
+
{ "GoogleCMPSupport", $"{Res.EXTRA_PATH}GoogleCMP.unitypackage" },
|
|
27
|
+
{ "AndroidPostProcessor", $"{Res.EXTRA_PATH}PostProcessor.unitypackage" }
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
private static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths)
|
|
31
|
+
{
|
|
32
|
+
if (importedAssets.Length == 0) return;
|
|
33
|
+
// Debug.LogWarning($"importedAssets: {string.Join("\n", importedAssets)}");
|
|
34
|
+
|
|
35
|
+
foreach (string path in importedAssets)
|
|
36
|
+
{
|
|
37
|
+
if (!path.EndsWith("AmaGDK.cs", StringComparison.InvariantCulture)) continue;
|
|
38
|
+
ImportAdapters();
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
[MenuItem("Window/AmaGDK/Reimport Adapters")]
|
|
44
|
+
private static void ImportAdapters()
|
|
45
|
+
{
|
|
46
|
+
var packages = new List<string>();
|
|
47
|
+
foreach (KeyValuePair<string, string> kvp in packageMap)
|
|
48
|
+
{
|
|
49
|
+
string[] assets = AssetDatabase.FindAssets($"t:monoscript {kvp.Key}");
|
|
50
|
+
if (assets.Length == 0)
|
|
51
|
+
{
|
|
52
|
+
// Debug.LogWarning($"Not found: {kvp.Key}");
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
packages.Add(kvp.Value);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// import packages
|
|
60
|
+
for (var i = 0; i < packages.Count; i++)
|
|
61
|
+
{
|
|
62
|
+
Debug.Log($"Reimport: {packages[i]}");
|
|
63
|
+
AssetDatabase.ImportPackage(packages[i], false);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
using Amanotes.Core.Internal;
|
|
2
|
+
using System;
|
|
3
|
+
namespace Amanotes.Core
|
|
4
|
+
{
|
|
5
|
+
public static class AdExtension
|
|
6
|
+
{
|
|
7
|
+
/// <summary>
|
|
8
|
+
/// Invoke when ad view has opened
|
|
9
|
+
/// </summary>
|
|
10
|
+
public static IAdCallback OnAdOpened(this IAdCallback ad, Action callback)
|
|
11
|
+
{
|
|
12
|
+
if (!MakeSureAdNotNull(ad)) return null;
|
|
13
|
+
AmaGDK.Ads.context.onOpened -= callback;
|
|
14
|
+
AmaGDK.Ads.context.onOpened += callback;
|
|
15
|
+
return ad;
|
|
16
|
+
}
|
|
17
|
+
/// <summary>
|
|
18
|
+
/// The user finished watching the video, and should be rewarded.
|
|
19
|
+
/// </summary>
|
|
20
|
+
public static IAdCallback OnRewardReceived(this IAdCallback ad, Action callback)
|
|
21
|
+
{
|
|
22
|
+
if (!MakeSureAdNotNull(ad)) return null;
|
|
23
|
+
AmaGDK.Ads.context.onRewardReceived -= callback;
|
|
24
|
+
AmaGDK.Ads.context.onRewardReceived += callback;
|
|
25
|
+
return ad;
|
|
26
|
+
}
|
|
27
|
+
/// <summary>
|
|
28
|
+
/// Invoked when the video ad was clicked.
|
|
29
|
+
/// </summary>
|
|
30
|
+
public static IAdCallback OnAdClicked(this IAdCallback ad, Action callback)
|
|
31
|
+
{
|
|
32
|
+
if (!MakeSureAdNotNull(ad)) return null;
|
|
33
|
+
AmaGDK.Ads.context.onClicked -= callback;
|
|
34
|
+
AmaGDK.Ads.context.onClicked += callback;
|
|
35
|
+
return ad;
|
|
36
|
+
}
|
|
37
|
+
/// <summary>
|
|
38
|
+
/// Callback when the rewarded video ad was failed to show
|
|
39
|
+
/// </summary>
|
|
40
|
+
public static IAdCallback OnAdShowFailed(this IAdCallback ad, Action callback)
|
|
41
|
+
{
|
|
42
|
+
if (!MakeSureAdNotNull(ad)) return null;
|
|
43
|
+
AmaGDK.Ads.context.onShowFailed -= callback;
|
|
44
|
+
AmaGDK.Ads.context.onShowFailed += callback;
|
|
45
|
+
return ad;
|
|
46
|
+
}
|
|
47
|
+
/// <summary>
|
|
48
|
+
/// Invoked before OnAdOpened but is not reliable (not supported by all adNetworks)
|
|
49
|
+
/// </summary>
|
|
50
|
+
public static IAdCallback OnAdShowSuccess(this IAdCallback ad, Action callback)
|
|
51
|
+
{
|
|
52
|
+
if (!MakeSureAdNotNull(ad)) return null;
|
|
53
|
+
AmaGDK.Ads.context.onShowSuccess -= callback;
|
|
54
|
+
AmaGDK.Ads.context.onShowSuccess += callback;
|
|
55
|
+
return ad;
|
|
56
|
+
}
|
|
57
|
+
/// <summary>
|
|
58
|
+
/// Invoke when ad view is about to be closed
|
|
59
|
+
/// </summary>
|
|
60
|
+
public static IAdCallback OnAdClosed(this IAdCallback ad, Action callback)
|
|
61
|
+
{
|
|
62
|
+
if (!MakeSureAdNotNull(ad)) return null;
|
|
63
|
+
AmaGDK.Ads.context.onClosed -= callback;
|
|
64
|
+
AmaGDK.Ads.context.onClosed += callback;
|
|
65
|
+
return ad;
|
|
66
|
+
}
|
|
67
|
+
/// <summary>
|
|
68
|
+
/// This callback may invokes several times according to the AdShowReadyStatus
|
|
69
|
+
/// - When there is no ad cached (wifi disabled / no internet / wait4Ad / timeout)
|
|
70
|
+
/// - When the ad is cached & ready to show
|
|
71
|
+
/// </summary>
|
|
72
|
+
public static IAdCallback OnAdShowReadyStatus(this IAdCallback ad, Action<AdShowReadyStatus> callback)
|
|
73
|
+
{
|
|
74
|
+
if (!MakeSureAdNotNull(ad)) return null;
|
|
75
|
+
AmaGDK.Ads.context.onAdShowReadyStatus -= callback;
|
|
76
|
+
AmaGDK.Ads.context.onAdShowReadyStatus += callback;
|
|
77
|
+
return ad;
|
|
78
|
+
}
|
|
79
|
+
/// <summary>
|
|
80
|
+
/// The finalize callback that will always trigger to mark an end for the AdShowRoutine
|
|
81
|
+
///
|
|
82
|
+
/// </summary>
|
|
83
|
+
public static IAdCallback OnAdResult(this IAdCallback ad, Action<bool> callback)
|
|
84
|
+
{
|
|
85
|
+
if (!MakeSureAdNotNull(ad)) return null;
|
|
86
|
+
AmaGDK.Ads.context.onAdResult -= callback;
|
|
87
|
+
AmaGDK.Ads.context.onAdResult += callback;
|
|
88
|
+
return ad;
|
|
89
|
+
}
|
|
90
|
+
/// <summary>
|
|
91
|
+
/// Call right before the ad actually open (that means Ad has already been cached & available to show).
|
|
92
|
+
/// This callback will not be triggered in case Ad is not available or no internet (in those case use OnAdShowReadyStatus callback)
|
|
93
|
+
/// </summary>
|
|
94
|
+
public static IAdCallback OnBeforeAdOpen(this IAdCallback ad, Action callback)
|
|
95
|
+
{
|
|
96
|
+
if (!MakeSureAdNotNull(ad)) return null;
|
|
97
|
+
AmaGDK.Ads.context.onBeforeAdOpen -= callback;
|
|
98
|
+
AmaGDK.Ads.context.onBeforeAdOpen += callback;
|
|
99
|
+
return ad;
|
|
100
|
+
}
|
|
101
|
+
private static bool MakeSureAdNotNull(IAdCallback ad)
|
|
102
|
+
{
|
|
103
|
+
bool isValid = (ad != null);
|
|
104
|
+
if (!isValid)
|
|
105
|
+
{
|
|
106
|
+
Logging.LogWarning("Something wrong:: no AdShowContext");
|
|
107
|
+
}
|
|
108
|
+
return isValid;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|