com.taptap.sdk.core 4.5.6 → 4.5.7
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 +1 -1
- package/Mobile/Runtime/TapEventMobile.cs +21 -0
- package/Runtime/Internal/Platform/ITapEventPlatform.cs +4 -0
- package/Runtime/Public/TapTapEvent.cs +7 -0
- package/Runtime/Public/TapTapSDK.cs +1 -1
- package/Runtime/Public/TapTapSdkOptions.cs +14 -0
- package/Standalone/Plugins/x86/tapsdkcore.dll +0 -0
- package/Standalone/Plugins/x86_64/tapsdkcore.dll +0 -0
- package/Standalone/Runtime/Internal/TapClientBridge.cs +5 -0
- package/Standalone/Runtime/Internal/UI/TapClientConnectTipController.cs +6 -2
- package/Standalone/Runtime/Public/TapCoreStandalone.cs +18 -4
- package/Standalone/Runtime/Public/TapEventStandalone.cs +27 -0
- package/link.xml.meta +1 -1
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<repositories>
|
|
5
5
|
<repository>https://repo.maven.apache.org/maven2</repository>
|
|
6
6
|
</repositories>
|
|
7
|
-
<androidPackage spec="com.taptap.sdk:tap-core-unity:4.5.
|
|
7
|
+
<androidPackage spec="com.taptap.sdk:tap-core-unity:4.5.7"/>
|
|
8
8
|
</androidPackages>
|
|
9
9
|
<iosPods>
|
|
10
10
|
<sources>
|
|
@@ -258,6 +258,27 @@ namespace TapSDK.Core.Mobile
|
|
|
258
258
|
IOSNativeWrapper.RegisterDynamicProperties(callback);
|
|
259
259
|
#else
|
|
260
260
|
AndroidNativeWrapper.RegisterDynamicProperties(callback);
|
|
261
|
+
#endif
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
public void SetOAID(string value)
|
|
265
|
+
{
|
|
266
|
+
Debug.Log("TapEventMobile SetOAID" + value);
|
|
267
|
+
#if UNITY_ANDROID
|
|
268
|
+
Bridge.CallHandler(EngineBridgeInitializer.GetBridgeServer()
|
|
269
|
+
.Method("setOAID")
|
|
270
|
+
.Args("oaid", value)
|
|
271
|
+
.CommandBuilder());
|
|
272
|
+
#endif
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
public void LogDeviceLoginEvent()
|
|
276
|
+
{
|
|
277
|
+
Debug.Log("TapEventMobile LogDeviceLoginEvent");
|
|
278
|
+
#if UNITY_ANDROID
|
|
279
|
+
Bridge.CallHandler(EngineBridgeInitializer.GetBridgeServer()
|
|
280
|
+
.Method("logDeviceLoginEvent")
|
|
281
|
+
.CommandBuilder());
|
|
261
282
|
#endif
|
|
262
283
|
}
|
|
263
284
|
}
|
|
@@ -33,5 +33,9 @@ namespace TapSDK.Core.Internal {
|
|
|
33
33
|
void LogChargeEvent(string orderID, string productName, long amount, string currencyType, string paymentMethod, string properties);
|
|
34
34
|
|
|
35
35
|
void RegisterDynamicProperties(Func<string> callback);
|
|
36
|
+
|
|
37
|
+
void SetOAID(string value);
|
|
38
|
+
|
|
39
|
+
void LogDeviceLoginEvent();
|
|
36
40
|
}
|
|
37
41
|
}
|
|
@@ -89,5 +89,12 @@ namespace TapSDK.Core {
|
|
|
89
89
|
platformWrapper?.RegisterDynamicProperties(callback);
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
+
public static void SetOAID(string value){
|
|
93
|
+
platformWrapper?.SetOAID(value);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
public static void LogDeviceLoginEvent(){
|
|
97
|
+
platformWrapper?.LogDeviceLoginEvent();
|
|
98
|
+
}
|
|
92
99
|
}
|
|
93
100
|
}
|
|
@@ -93,6 +93,20 @@ namespace TapSDK.Core
|
|
|
93
93
|
/// </summary>
|
|
94
94
|
public bool enableLog = false;
|
|
95
95
|
|
|
96
|
+
/// <summary>
|
|
97
|
+
/// 是否禁用 OAID 反射
|
|
98
|
+
/// </summary>
|
|
99
|
+
public bool disableReflectionOAID = true;
|
|
100
|
+
|
|
101
|
+
/// <summary>
|
|
102
|
+
/// 是否即用禁用自动上报设备登录事件
|
|
103
|
+
/// </summary>
|
|
104
|
+
public bool disableAutoLogDeviceLogin = false;
|
|
105
|
+
|
|
106
|
+
/// <summary>
|
|
107
|
+
/// 屏幕方向:0-竖屏 1-横屏
|
|
108
|
+
/// </summary>
|
|
109
|
+
public int screenOrientation = 0;
|
|
96
110
|
|
|
97
111
|
[JsonProperty("moduleName")]
|
|
98
112
|
private string _moduleName = "TapTapSDKCore";
|
|
Binary file
|
|
Binary file
|
|
@@ -21,6 +21,11 @@ namespace TapSDK.Core.Standalone.Internal
|
|
|
21
21
|
kTapSDKInitResult_NoPlatform = 2,
|
|
22
22
|
// 已安装 TapTap,游戏未通过 TapTap 启动
|
|
23
23
|
kTapSDKInitResult_NotLaunchedByPlatform = 3,
|
|
24
|
+
|
|
25
|
+
// SDK 本地执行时未知错误
|
|
26
|
+
kTapSDKInitResult_Unknown = -1,
|
|
27
|
+
// SDK 本地执行时超时
|
|
28
|
+
kTapSDKInitResult_Timeout = -2,
|
|
24
29
|
};
|
|
25
30
|
|
|
26
31
|
internal enum TapCallbackID
|
|
@@ -34,9 +34,13 @@ namespace TapSDK.Core.Standalone.Internal {
|
|
|
34
34
|
if (errorType == TapSDKInitResult.kTapSDKInitResult_NoPlatform){
|
|
35
35
|
tipText.text = "获取游戏信息失败,请下载 TapTap 客户端后重新启动游戏";
|
|
36
36
|
}else if (errorType == TapSDKInitResult.kTapSDKInitResult_NotLaunchedByPlatform){
|
|
37
|
-
|
|
37
|
+
tipText.text = "获取游戏信息失败,请从 TapTap 客户端重新启动游戏";
|
|
38
|
+
}else if (errorType == TapSDKInitResult.kTapSDKInitResult_Unknown){
|
|
39
|
+
tipText.text = "本地发生未知错误,请从 TapTap 客户端重新启动游戏";
|
|
40
|
+
}else if (errorType == TapSDKInitResult.kTapSDKInitResult_Timeout){
|
|
41
|
+
tipText.text = "获取游戏信息超时,请从 TapTap 客户端重新启动游戏";
|
|
38
42
|
}else {
|
|
39
|
-
|
|
43
|
+
tipText.text = "发生未知错误,请从 TapTap 客户端重新启动游戏";
|
|
40
44
|
}
|
|
41
45
|
}
|
|
42
46
|
|
|
@@ -398,17 +398,31 @@ namespace TapSDK.Core.Standalone
|
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
|
+
catch(TimeoutException e)
|
|
402
|
+
{
|
|
403
|
+
lastIsLaunchedFromTapTapPCResult = 0;
|
|
404
|
+
TapCoreTracker.Instance.TrackFailure(TapCoreTracker.METHOD_LAUNCHER, sessionId, (int)TapSDKInitResult.kTapSDKInitResult_Timeout, e.Message ?? "");
|
|
405
|
+
|
|
406
|
+
TapLogger.Debug("IsLaunchedFromTapTapPC check timeout");
|
|
407
|
+
string tipPannelPath = "Prefabs/TapClient/TapClientConnectTipPanel";
|
|
408
|
+
if (Resources.Load<GameObject>(tipPannelPath) != null)
|
|
409
|
+
{
|
|
410
|
+
var pannel = UIManager.Instance.OpenUI<TapClientConnectTipController>(tipPannelPath);
|
|
411
|
+
pannel.Show(TapSDKInitResult.kTapSDKInitResult_Timeout);
|
|
412
|
+
}
|
|
413
|
+
return false;
|
|
414
|
+
}
|
|
401
415
|
catch (Exception e)
|
|
402
416
|
{
|
|
403
417
|
lastIsLaunchedFromTapTapPCResult = 0;
|
|
404
|
-
TapCoreTracker.Instance.TrackFailure(TapCoreTracker.METHOD_LAUNCHER, sessionId,
|
|
418
|
+
TapCoreTracker.Instance.TrackFailure(TapCoreTracker.METHOD_LAUNCHER, sessionId, (int)TapSDKInitResult.kTapSDKInitResult_Unknown, e.Message ?? "");
|
|
405
419
|
|
|
406
420
|
TapLogger.Debug("IsLaunchedFromTapTapPC check exception = " + e.StackTrace);
|
|
407
421
|
string tipPannelPath = "Prefabs/TapClient/TapClientConnectTipPanel";
|
|
408
422
|
if (Resources.Load<GameObject>(tipPannelPath) != null)
|
|
409
423
|
{
|
|
410
424
|
var pannel = UIManager.Instance.OpenUI<TapClientConnectTipController>(tipPannelPath);
|
|
411
|
-
pannel.Show(TapSDKInitResult.
|
|
425
|
+
pannel.Show(TapSDKInitResult.kTapSDKInitResult_Unknown);
|
|
412
426
|
}
|
|
413
427
|
return false;
|
|
414
428
|
}
|
|
@@ -446,10 +460,10 @@ namespace TapSDK.Core.Standalone
|
|
|
446
460
|
task.TrySetResult(tapInitResult);
|
|
447
461
|
|
|
448
462
|
}
|
|
449
|
-
catch (TimeoutException)
|
|
463
|
+
catch (TimeoutException ex)
|
|
450
464
|
{
|
|
451
465
|
TapLogger.Debug("RunClientBridgeMethodWithTimeout invoke CheckInitState 方法执行超时!");
|
|
452
|
-
task.TrySetException(
|
|
466
|
+
task.TrySetException(ex);
|
|
453
467
|
}
|
|
454
468
|
catch (Exception ex)
|
|
455
469
|
{
|
|
@@ -292,6 +292,33 @@ namespace TapSDK.Core.Standalone
|
|
|
292
292
|
Tracker.RegisterDynamicPropsDelegate(dynamicProperties);
|
|
293
293
|
}
|
|
294
294
|
|
|
295
|
+
/// <summary>
|
|
296
|
+
/// set custom oaid value
|
|
297
|
+
/// </summary>
|
|
298
|
+
/// <param name="value">oaid</param>
|
|
299
|
+
public void SetOAID(string value)
|
|
300
|
+
{
|
|
301
|
+
if (!TapCoreStandalone.CheckInitState())
|
|
302
|
+
{
|
|
303
|
+
return;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/// <summary>
|
|
309
|
+
/// Logs a device login event.
|
|
310
|
+
/// </summary>
|
|
311
|
+
public void LogDeviceLoginEvent()
|
|
312
|
+
{
|
|
313
|
+
// PC端空实现
|
|
314
|
+
if (!TapCoreStandalone.CheckInitState())
|
|
315
|
+
{
|
|
316
|
+
return;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
Debug.Log("LogDeviceLoginEvent called in PC platform (empty implementation)");
|
|
320
|
+
}
|
|
321
|
+
|
|
295
322
|
/// <summary>
|
|
296
323
|
/// Represents the implementation of dynamic properties for the Tap event platform.
|
|
297
324
|
/// </summary>
|
package/link.xml.meta
CHANGED