com.taptap.sdk.core 4.8.0-beta.1 → 4.8.1-beta.1
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/Mobile/Editor/NativeDependencies.xml +2 -2
- package/Mobile/Runtime/AndroidNativeWrapper.cs +2 -1
- package/Mobile/Runtime/BridgeAndroid.cs +2 -1
- package/Mobile/Runtime/BridgeIOS.cs +2 -3
- package/Mobile/Runtime/EngineBridgeInitializer.cs +2 -1
- package/Mobile/Runtime/TapCoreMobile.cs +6 -5
- package/Mobile/Runtime/TapEventMobile.cs +22 -21
- package/Resources/TapMessage.prefab +8 -8
- package/Runtime/Internal/Http/TapHttpClient.cs +2 -1
- package/Runtime/Internal/Http/TapHttpUtils.cs +3 -2
- package/Runtime/Internal/Log/TapLog.cs +39 -3
- package/Runtime/Internal/Platform/PlatformTypeUtils.cs +3 -7
- package/Runtime/Internal/UI/Base/UIManager.cs +2 -1
- package/Runtime/Internal/UI/BasePanel/BasePanelController.cs +2 -1
- package/Runtime/Internal/Utils/BridgeUtils.cs +23 -22
- package/Runtime/Internal/Utils/EventManager.cs +1 -1
- package/Runtime/Internal/Utils/ImageUtils.cs +5 -4
- package/Runtime/Public/DataStorage.cs +17 -4
- package/Runtime/Public/Log/TapLogger.cs +1 -1
- package/Runtime/Public/TapTapEvent.cs +2 -1
- package/Runtime/Public/TapTapSDK.cs +2 -2
- package/Standalone/Plugins/x86/tapsdkcore.dll +0 -0
- package/Standalone/Plugins/x86_64/tapsdkcore.dll +0 -0
- package/Standalone/Plugins/x86_64/taptap_api.dll +0 -0
- package/Standalone/Plugins/x86_64/taptap_api.dll.meta +34 -6
- package/Standalone/Runtime/Internal/DeviceInfo.cs +2 -1
- package/Standalone/Runtime/Internal/EventSender.cs +2 -2
- package/Standalone/Runtime/Internal/Http/TapHttpUtils.cs +0 -8
- package/Standalone/Runtime/Internal/Openlog/TapOpenlogWrapper.cs +2 -2
- package/Standalone/Runtime/Internal/Prefs.cs +3 -2
- package/Standalone/Runtime/Internal/TapClientBridge.cs +222 -139
- package/Standalone/Runtime/Internal/TapClientBridgePoll.cs +2 -1
- package/Standalone/Runtime/Internal/Tracker.cs +7 -6
- package/Standalone/Runtime/Internal/UI/TapClientConnectTipController.cs +6 -6
- package/Standalone/Runtime/Public/TapClientStandalone.cs +122 -84
- package/Standalone/Runtime/Public/TapCoreStandalone.cs +1 -1
- package/Standalone/Runtime/Public/TapEventStandalone.cs +9 -9
- package/link.xml.meta +1 -1
- package/package.json +9 -9
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
using System.Linq;
|
|
3
3
|
using System.Collections.Generic;
|
|
4
4
|
using UnityEngine;
|
|
5
|
+
using TapSDK.Core.Internal.Log;
|
|
5
6
|
|
|
6
7
|
namespace TapSDK.Core.Internal.Utils {
|
|
7
8
|
public static class BridgeUtils {
|
|
@@ -13,25 +14,25 @@ namespace TapSDK.Core.Internal.Utils {
|
|
|
13
14
|
Application.platform == RuntimePlatform.LinuxPlayer;
|
|
14
15
|
|
|
15
16
|
public static object CreateBridgeImplementation(Type interfaceType, string startWith) {
|
|
16
|
-
|
|
17
|
+
TapLog.Log($"[TapTap] 开始查找实现类: interfaceType={interfaceType.FullName}, startWith={startWith}, 当前平台={Application.platform}");
|
|
17
18
|
|
|
18
19
|
// 跳过初始化直接使用 TapLoom会在子线程被TapSDK.Core.BridgeCallback.Invoke 初始化
|
|
19
20
|
TapLoom.Initialize();
|
|
20
21
|
|
|
21
22
|
// 获取所有程序集
|
|
22
23
|
var allAssemblies = AppDomain.CurrentDomain.GetAssemblies();
|
|
23
|
-
|
|
24
|
+
TapLog.Log($"[TapTap] 已加载的程序集总数: {allAssemblies.Length}");
|
|
24
25
|
|
|
25
26
|
// 查找以 startWith 开头的程序集
|
|
26
27
|
var matchingAssemblies = allAssemblies
|
|
27
28
|
.Where(assembly => assembly.GetName().FullName.StartsWith(startWith))
|
|
28
29
|
.ToList();
|
|
29
30
|
|
|
30
|
-
|
|
31
|
+
TapLog.Log($"[TapTap] 找到匹配 '{startWith}' 的程序集数量: {matchingAssemblies.Count}");
|
|
31
32
|
|
|
32
33
|
// 打印匹配的程序集名称
|
|
33
34
|
foreach (var assembly in matchingAssemblies) {
|
|
34
|
-
|
|
35
|
+
TapLog.Log($"[TapTap] 匹配的程序集: {assembly.GetName().FullName}");
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
// 如果没有找到匹配的程序集,打印所有TapSDK相关的程序集
|
|
@@ -41,9 +42,9 @@ namespace TapSDK.Core.Internal.Utils {
|
|
|
41
42
|
assembly.GetName().FullName.Contains("TapTap"))
|
|
42
43
|
.ToList();
|
|
43
44
|
|
|
44
|
-
|
|
45
|
+
TapLog.Log($"[TapTap] 未找到匹配的程序集,但找到 {tapAssemblies.Count} 个相关程序集:");
|
|
45
46
|
foreach (var assembly in tapAssemblies) {
|
|
46
|
-
|
|
47
|
+
TapLog.Log($"[TapTap] - {assembly.GetName().FullName}");
|
|
47
48
|
}
|
|
48
49
|
}
|
|
49
50
|
|
|
@@ -55,15 +56,15 @@ namespace TapSDK.Core.Internal.Utils {
|
|
|
55
56
|
.Where(type => type.IsClass && interfaceType.IsAssignableFrom(type))
|
|
56
57
|
.ToList();
|
|
57
58
|
|
|
58
|
-
|
|
59
|
+
TapLog.Log($"[TapTap] 在程序集 {assembly.GetName().Name} 中找到 {types.Count} 个实现 {interfaceType.Name} 的类");
|
|
59
60
|
|
|
60
61
|
foreach (var type in types) {
|
|
61
|
-
|
|
62
|
+
TapLog.Log($"[TapTap] - {type.FullName} (IsPublic: {type.IsPublic}, IsAbstract: {type.IsAbstract})");
|
|
62
63
|
allCandidateTypes.Add(type);
|
|
63
64
|
}
|
|
64
65
|
}
|
|
65
66
|
catch (Exception ex) {
|
|
66
|
-
|
|
67
|
+
TapLog.Error($"[TapTap] 获取程序集 {assembly.GetName().Name} 中的类型时出错: {ex.Message}");
|
|
67
68
|
}
|
|
68
69
|
}
|
|
69
70
|
|
|
@@ -80,33 +81,33 @@ namespace TapSDK.Core.Internal.Utils {
|
|
|
80
81
|
})
|
|
81
82
|
.SingleOrDefault(clazz => interfaceType.IsAssignableFrom(clazz) && clazz.IsClass);
|
|
82
83
|
|
|
83
|
-
|
|
84
|
+
TapLog.Log($"[TapTap] SingleOrDefault 查找结果: {(bridgeImplementationType != null ? bridgeImplementationType.FullName : "null")}");
|
|
84
85
|
|
|
85
86
|
// 如果使用 SingleOrDefault 没找到,尝试使用 FirstOrDefault
|
|
86
87
|
if (bridgeImplementationType == null && allCandidateTypes.Count > 0) {
|
|
87
|
-
|
|
88
|
+
TapLog.Log($"[TapTap] SingleOrDefault 未找到实现,但有 {allCandidateTypes.Count} 个候选类型,尝试使用 FirstOrDefault");
|
|
88
89
|
bridgeImplementationType = allCandidateTypes.FirstOrDefault();
|
|
89
|
-
|
|
90
|
+
TapLog.Log($"[TapTap] FirstOrDefault 查找结果: {(bridgeImplementationType != null ? bridgeImplementationType.FullName : "null")}");
|
|
90
91
|
}
|
|
91
92
|
|
|
92
93
|
// 如果找到多个实现,可能是 SingleOrDefault 失败的原因
|
|
93
94
|
if (allCandidateTypes.Count > 1) {
|
|
94
|
-
|
|
95
|
+
TapLog.Warning($"[TapTap] 找到多个实现 {interfaceType.Name} 的类,这可能导致 SingleOrDefault 返回 null");
|
|
95
96
|
foreach (var type in allCandidateTypes) {
|
|
96
|
-
|
|
97
|
+
TapLog.Warning($"[TapTap] - {type.FullName}");
|
|
97
98
|
}
|
|
98
99
|
}
|
|
99
100
|
}
|
|
100
101
|
catch (Exception ex) {
|
|
101
|
-
|
|
102
|
+
TapLog.Error($"[TapTap] 在查找实现类时发生异常: {ex.Message}\n{ex.StackTrace}");
|
|
102
103
|
}
|
|
103
104
|
|
|
104
105
|
if (bridgeImplementationType == null) {
|
|
105
|
-
|
|
106
|
+
TapLog.Warning($"[TapTap] TapSDK 无法为 {interfaceType} 找到平台 {Application.platform} 上的实现类。");
|
|
106
107
|
|
|
107
108
|
// 尝试在所有程序集中查找实现(不限制命名空间前缀)
|
|
108
109
|
if (matchingAssemblies.Count == 0) {
|
|
109
|
-
|
|
110
|
+
TapLog.Log("[TapTap] 尝试在所有程序集中查找实现...");
|
|
110
111
|
List<Type> implementationsInAllAssemblies = new List<Type>();
|
|
111
112
|
|
|
112
113
|
foreach (var assembly in allAssemblies) {
|
|
@@ -116,7 +117,7 @@ namespace TapSDK.Core.Internal.Utils {
|
|
|
116
117
|
.ToList();
|
|
117
118
|
|
|
118
119
|
if (types.Count > 0) {
|
|
119
|
-
|
|
120
|
+
TapLog.Log($"[TapTap] 在程序集 {assembly.GetName().Name} 中找到 {types.Count} 个实现");
|
|
120
121
|
implementationsInAllAssemblies.AddRange(types);
|
|
121
122
|
}
|
|
122
123
|
}
|
|
@@ -124,9 +125,9 @@ namespace TapSDK.Core.Internal.Utils {
|
|
|
124
125
|
}
|
|
125
126
|
|
|
126
127
|
if (implementationsInAllAssemblies.Count > 0) {
|
|
127
|
-
|
|
128
|
+
TapLog.Log($"[TapTap] 在所有程序集中找到 {implementationsInAllAssemblies.Count} 个实现:");
|
|
128
129
|
foreach (var type in implementationsInAllAssemblies) {
|
|
129
|
-
|
|
130
|
+
TapLog.Log($"[TapTap] - {type.FullName} (在程序集 {type.Assembly.GetName().Name} 中)");
|
|
130
131
|
}
|
|
131
132
|
}
|
|
132
133
|
}
|
|
@@ -135,11 +136,11 @@ namespace TapSDK.Core.Internal.Utils {
|
|
|
135
136
|
}
|
|
136
137
|
|
|
137
138
|
try {
|
|
138
|
-
|
|
139
|
+
TapLog.Log($"[TapTap] 创建 {bridgeImplementationType.FullName} 的实例");
|
|
139
140
|
return Activator.CreateInstance(bridgeImplementationType);
|
|
140
141
|
}
|
|
141
142
|
catch (Exception ex) {
|
|
142
|
-
|
|
143
|
+
TapLog.Error($"[TapTap] 创建实例时出错: {ex.Message}");
|
|
143
144
|
return null;
|
|
144
145
|
}
|
|
145
146
|
}
|
|
@@ -10,7 +10,7 @@ namespace TapSDK.Core.Internal.Utils
|
|
|
10
10
|
public const string OnApplicationQuit = "OnApplicationQuit";
|
|
11
11
|
|
|
12
12
|
public const string OnComplianceUserChanged = "OnComplianceUserChanged";
|
|
13
|
-
|
|
13
|
+
public const string OnTapUserChanged = "OnTapUserChanged";
|
|
14
14
|
public const string IsLaunchedFromTapTapPCFinished = "IsLaunchedFromTapTapPCFinished";
|
|
15
15
|
private Dictionary<string, Action<object>> eventRegistries = new Dictionary<string, Action<object>>();
|
|
16
16
|
|
|
@@ -6,6 +6,7 @@ using System.Text;
|
|
|
6
6
|
using System.IO;
|
|
7
7
|
using UnityEngine;
|
|
8
8
|
using UnityEngine.Networking;
|
|
9
|
+
using TapSDK.Core.Internal.Log;
|
|
9
10
|
|
|
10
11
|
namespace TapSDK.Core.Internal.Utils {
|
|
11
12
|
public class ImageUtils {
|
|
@@ -16,7 +17,7 @@ namespace TapSDK.Core.Internal.Utils {
|
|
|
16
17
|
|
|
17
18
|
public static async Task<Texture> LoadImage(string url, int timeout = 30, bool useMemoryCache = true) {
|
|
18
19
|
if (string.IsNullOrEmpty(url)) {
|
|
19
|
-
|
|
20
|
+
TapLog.Warning(string.Format($"ImageUtils Fetch image is null! url is null or empty!"));
|
|
20
21
|
return null;
|
|
21
22
|
}
|
|
22
23
|
|
|
@@ -35,7 +36,7 @@ namespace TapSDK.Core.Internal.Utils {
|
|
|
35
36
|
|
|
36
37
|
return cachedImage;
|
|
37
38
|
} catch (Exception e) {
|
|
38
|
-
|
|
39
|
+
TapLog.Warning(e.Message);
|
|
39
40
|
try {
|
|
40
41
|
// 从网络加载
|
|
41
42
|
Texture2D newTex = await FetchImage(url, timeout);
|
|
@@ -49,7 +50,7 @@ namespace TapSDK.Core.Internal.Utils {
|
|
|
49
50
|
|
|
50
51
|
return newTex;
|
|
51
52
|
} catch (Exception ex) {
|
|
52
|
-
|
|
53
|
+
TapLog.Warning(ex.Message);
|
|
53
54
|
return null;
|
|
54
55
|
}
|
|
55
56
|
}
|
|
@@ -69,7 +70,7 @@ namespace TapSDK.Core.Internal.Utils {
|
|
|
69
70
|
} else {
|
|
70
71
|
Texture2D texture = ((DownloadHandlerTexture)request.downloadHandler)?.texture;
|
|
71
72
|
if (texture == null) {
|
|
72
|
-
|
|
73
|
+
TapLog.Warning($"ImageUtils Fetch image is null! url: {url}");
|
|
73
74
|
}
|
|
74
75
|
return texture;
|
|
75
76
|
}
|
|
@@ -4,6 +4,7 @@ using System.IO;
|
|
|
4
4
|
using System.Net.NetworkInformation;
|
|
5
5
|
using System.Security.Cryptography;
|
|
6
6
|
using System.Text;
|
|
7
|
+
using TapSDK.Core.Internal.Log;
|
|
7
8
|
using UnityEngine;
|
|
8
9
|
|
|
9
10
|
namespace TapSDK.Core
|
|
@@ -16,7 +17,8 @@ namespace TapSDK.Core
|
|
|
16
17
|
{
|
|
17
18
|
string storageKey = GenerateStorageKey(key);
|
|
18
19
|
SaveStringToCache(storageKey, value);
|
|
19
|
-
|
|
20
|
+
string encodeValue = EncodeString(value);
|
|
21
|
+
PlayerPrefs.SetString(storageKey, encodeValue);
|
|
20
22
|
}
|
|
21
23
|
|
|
22
24
|
public static string LoadString(string key)
|
|
@@ -29,10 +31,12 @@ namespace TapSDK.Core
|
|
|
29
31
|
}
|
|
30
32
|
value = PlayerPrefs.HasKey(storageKey) ? DecodeString(PlayerPrefs.GetString(storageKey)) : null;
|
|
31
33
|
// 尝试从本地获取旧版本数据
|
|
32
|
-
if (value == null)
|
|
34
|
+
if (value == null)
|
|
35
|
+
{
|
|
33
36
|
value = PlayerPrefs.HasKey(key) ? DecodeString(PlayerPrefs.GetString(key)) : null;
|
|
34
37
|
// 旧版本存在有效数据时,转储为新的 storageKey
|
|
35
|
-
if (value != null)
|
|
38
|
+
if (value != null)
|
|
39
|
+
{
|
|
36
40
|
PlayerPrefs.SetString(storageKey, EncodeString(value));
|
|
37
41
|
PlayerPrefs.DeleteKey(key);
|
|
38
42
|
}
|
|
@@ -44,6 +48,15 @@ namespace TapSDK.Core
|
|
|
44
48
|
return value;
|
|
45
49
|
}
|
|
46
50
|
|
|
51
|
+
public static void RemoveCacheKey(string key)
|
|
52
|
+
{
|
|
53
|
+
if (!string.IsNullOrEmpty(key))
|
|
54
|
+
{
|
|
55
|
+
PlayerPrefs.DeleteKey(key);
|
|
56
|
+
PlayerPrefs.DeleteKey(GenerateStorageKey(key));
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
47
60
|
private static void SaveStringToCache(string key, string value)
|
|
48
61
|
{
|
|
49
62
|
if (dataCache == null)
|
|
@@ -115,7 +128,7 @@ namespace TapSDK.Core
|
|
|
115
128
|
}
|
|
116
129
|
catch (Exception e)
|
|
117
130
|
{
|
|
118
|
-
|
|
131
|
+
TapLog.Log(e.Message);
|
|
119
132
|
return decryptString;
|
|
120
133
|
}
|
|
121
134
|
}
|
|
@@ -3,6 +3,7 @@ using System.Threading.Tasks;
|
|
|
3
3
|
using TapSDK.Core.Internal;
|
|
4
4
|
using UnityEngine;
|
|
5
5
|
using System.Reflection;
|
|
6
|
+
using TapSDK.Core.Internal.Log;
|
|
6
7
|
|
|
7
8
|
namespace TapSDK.Core {
|
|
8
9
|
public class TapTapEvent {
|
|
@@ -14,7 +15,7 @@ namespace TapSDK.Core {
|
|
|
14
15
|
platformWrapper = PlatformTypeUtils.CreatePlatformImplementationObject(typeof(ITapEventPlatform),
|
|
15
16
|
"TapSDK.Core") as ITapEventPlatform;
|
|
16
17
|
if(platformWrapper == null) {
|
|
17
|
-
|
|
18
|
+
TapLog.Error("PlatformWrapper is null");
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
21
|
|
|
@@ -12,7 +12,7 @@ using System.ComponentModel;
|
|
|
12
12
|
|
|
13
13
|
namespace TapSDK.Core {
|
|
14
14
|
public class TapTapSDK {
|
|
15
|
-
public static readonly string Version = "4.8.
|
|
15
|
+
public static readonly string Version = "4.8.1-beta.1";
|
|
16
16
|
|
|
17
17
|
public static string SDKPlatform = "TapSDK-Unity";
|
|
18
18
|
|
|
@@ -54,7 +54,7 @@ namespace TapSDK.Core {
|
|
|
54
54
|
initTasks = initTasks.OrderBy(task => task.Order).ToList();
|
|
55
55
|
foreach (IInitTask task in initTasks)
|
|
56
56
|
{
|
|
57
|
-
|
|
57
|
+
TapLog.Log($"Init: {task.GetType().Name}");
|
|
58
58
|
task.Init(coreOption);
|
|
59
59
|
}
|
|
60
60
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -11,34 +11,53 @@ PluginImporter:
|
|
|
11
11
|
isExplicitlyReferenced: 0
|
|
12
12
|
validateReferences: 1
|
|
13
13
|
platformData:
|
|
14
|
+
- first:
|
|
15
|
+
: Any
|
|
16
|
+
second:
|
|
17
|
+
enabled: 0
|
|
18
|
+
settings:
|
|
19
|
+
Exclude Android: 1
|
|
20
|
+
Exclude Editor: 0
|
|
21
|
+
Exclude Linux64: 1
|
|
22
|
+
Exclude OSXUniversal: 1
|
|
23
|
+
Exclude Win: 0
|
|
24
|
+
Exclude Win64: 0
|
|
25
|
+
Exclude iOS: 1
|
|
26
|
+
- first:
|
|
27
|
+
Android: Android
|
|
28
|
+
second:
|
|
29
|
+
enabled: 0
|
|
30
|
+
settings:
|
|
31
|
+
CPU: ARMv7
|
|
14
32
|
- first:
|
|
15
33
|
Any:
|
|
16
34
|
second:
|
|
17
|
-
enabled:
|
|
35
|
+
enabled: 0
|
|
18
36
|
settings: {}
|
|
19
37
|
- first:
|
|
20
38
|
Editor: Editor
|
|
21
39
|
second:
|
|
22
|
-
enabled:
|
|
40
|
+
enabled: 1
|
|
23
41
|
settings:
|
|
24
42
|
CPU: x86_64
|
|
25
43
|
DefaultValueInitialized: true
|
|
44
|
+
OS: Windows
|
|
26
45
|
- first:
|
|
27
46
|
Standalone: Linux64
|
|
28
47
|
second:
|
|
29
|
-
enabled:
|
|
48
|
+
enabled: 0
|
|
30
49
|
settings:
|
|
31
|
-
CPU:
|
|
50
|
+
CPU: None
|
|
32
51
|
- first:
|
|
33
52
|
Standalone: OSXUniversal
|
|
34
53
|
second:
|
|
35
54
|
enabled: 0
|
|
36
55
|
settings:
|
|
37
|
-
CPU:
|
|
56
|
+
CPU: None
|
|
38
57
|
- first:
|
|
39
58
|
Standalone: Win
|
|
40
59
|
second:
|
|
41
|
-
enabled:
|
|
60
|
+
enabled: 1
|
|
42
61
|
settings:
|
|
43
62
|
CPU: None
|
|
44
63
|
- first:
|
|
@@ -46,7 +65,16 @@ PluginImporter:
|
|
|
46
65
|
second:
|
|
47
66
|
enabled: 1
|
|
48
67
|
settings:
|
|
68
|
+
CPU: x86_64
|
|
69
|
+
- first:
|
|
70
|
+
iPhone: iOS
|
|
71
|
+
second:
|
|
72
|
+
enabled: 0
|
|
73
|
+
settings:
|
|
74
|
+
AddToEmbeddedBinaries: false
|
|
49
75
|
CPU: AnyCPU
|
|
76
|
+
CompileFlags:
|
|
77
|
+
FrameworkDependencies:
|
|
50
78
|
userData:
|
|
51
79
|
assetBundleName:
|
|
52
80
|
assetBundleVariant:
|
|
@@ -5,6 +5,7 @@ using System.Collections.Generic;
|
|
|
5
5
|
using System.Net.NetworkInformation;
|
|
6
6
|
using UnityEngine;
|
|
7
7
|
using System.Diagnostics;
|
|
8
|
+
using TapSDK.Core.Internal.Log;
|
|
8
9
|
|
|
9
10
|
namespace TapSDK.Core.Standalone.Internal
|
|
10
11
|
{
|
|
@@ -87,7 +88,7 @@ namespace TapSDK.Core.Standalone.Internal
|
|
|
87
88
|
}
|
|
88
89
|
catch (Exception e)
|
|
89
90
|
{
|
|
90
|
-
|
|
91
|
+
TapLog.Log("GetMacAddress Exception " + e.Message);
|
|
91
92
|
}
|
|
92
93
|
macAddressList = $"[{string.Join(",", mac_addrs)}]";
|
|
93
94
|
firstMacAddress = mac_addrs.Count > 0 ? mac_addrs[0].Replace("\"", "") : string.Empty;
|
|
@@ -183,7 +183,7 @@ namespace TapSDK.Core.Standalone.Internal
|
|
|
183
183
|
|
|
184
184
|
if (string.IsNullOrEmpty(GetEventCacheFileName()))
|
|
185
185
|
{
|
|
186
|
-
|
|
186
|
+
TapLog.Error("EventFilePath is null or empty");
|
|
187
187
|
return;
|
|
188
188
|
}
|
|
189
189
|
|
|
@@ -198,7 +198,7 @@ namespace TapSDK.Core.Standalone.Internal
|
|
|
198
198
|
}
|
|
199
199
|
catch (Exception ex)
|
|
200
200
|
{
|
|
201
|
-
|
|
201
|
+
TapLog.Error("SaveEvents Exception - " + ex.Message);
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
|
|
@@ -126,10 +126,6 @@ namespace TapSDK.Core.Standalone.Internal.Http
|
|
|
126
126
|
|
|
127
127
|
public static void PrintRequest(HttpClient client, HttpRequestMessage request)
|
|
128
128
|
{
|
|
129
|
-
if (TapLogger.LogDelegate == null)
|
|
130
|
-
{
|
|
131
|
-
return;
|
|
132
|
-
}
|
|
133
129
|
if (client == null)
|
|
134
130
|
{
|
|
135
131
|
return;
|
|
@@ -176,10 +172,6 @@ namespace TapSDK.Core.Standalone.Internal.Http
|
|
|
176
172
|
|
|
177
173
|
public static void PrintResponse(HttpResponseMessage response)
|
|
178
174
|
{
|
|
179
|
-
if (TapLogger.LogDelegate == null)
|
|
180
|
-
{
|
|
181
|
-
return;
|
|
182
|
-
}
|
|
183
175
|
StringBuilder sb = new StringBuilder();
|
|
184
176
|
sb.AppendLine("=== HTTP Response Start ===");
|
|
185
177
|
sb.AppendLine($"URL: {response.RequestMessage.RequestUri}");
|
|
@@ -25,8 +25,8 @@ namespace TapSDK.Core.Standalone.Internal.Openlog
|
|
|
25
25
|
"env": "local",
|
|
26
26
|
"platform": "abc",
|
|
27
27
|
"ua": "TapSDK-Android/3.28.0",
|
|
28
|
-
"client_id": "
|
|
29
|
-
"client_token": "
|
|
28
|
+
"client_id": "***",
|
|
29
|
+
"client_token": "***",
|
|
30
30
|
"modules": [
|
|
31
31
|
"app_duration"
|
|
32
32
|
],
|
|
@@ -6,6 +6,7 @@ using System.Linq;
|
|
|
6
6
|
using System.IO;
|
|
7
7
|
using UnityEngine;
|
|
8
8
|
using TapSDK.Core;
|
|
9
|
+
using TapSDK.Core.Internal.Log;
|
|
9
10
|
|
|
10
11
|
namespace TapSDK.Core.Standalone.Internal {
|
|
11
12
|
public class Prefs {
|
|
@@ -38,7 +39,7 @@ namespace TapSDK.Core.Standalone.Internal {
|
|
|
38
39
|
Dictionary<string, object> jsonData = Json.Deserialize(json) as Dictionary<string, object>;
|
|
39
40
|
data = new ConcurrentDictionary<string, object>(jsonData);
|
|
40
41
|
} catch (Exception e) {
|
|
41
|
-
|
|
42
|
+
TapLog.Error(e.Message);
|
|
42
43
|
File.Delete(persistentFilePath);
|
|
43
44
|
}
|
|
44
45
|
}
|
|
@@ -88,7 +89,7 @@ namespace TapSDK.Core.Standalone.Internal {
|
|
|
88
89
|
string json = Json.Serialize(dict);
|
|
89
90
|
File.WriteAllText(persistentFilePath, json);
|
|
90
91
|
} catch (Exception e) {
|
|
91
|
-
|
|
92
|
+
TapLog.Error(e.Message);
|
|
92
93
|
}
|
|
93
94
|
}
|
|
94
95
|
}
|