Commit 643c3b87 authored by 王雪伟's avatar 王雪伟

修改穿山甲开屏加载超时问题

parent 360e4375
...@@ -242,8 +242,10 @@ public class AdManager ...@@ -242,8 +242,10 @@ public class AdManager
if (adList == null || adList.Count == 0) if (adList == null || adList.Count == 0)
{ {
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "Splash没有广告数据"); Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "Splash没有广告数据");
listener.onLastError();
return; return;
} }
List<AdEntity> totalEntityList = adList; List<AdEntity> totalEntityList = adList;
AdEntity entity = totalEntityList[0]; AdEntity entity = totalEntityList[0];
entity.actionName = "开屏"; entity.actionName = "开屏";
......
...@@ -174,6 +174,14 @@ public class CSJSplshADUtils ...@@ -174,6 +174,14 @@ public class CSJSplshADUtils
#endif #endif
} }
public void onTimeout()
{
EventUtils.onEventPullFail(entity, "-1", "网络超时");
listener.onError("CSJ SplshAd code -1 message 网络超时");
Debug.Log("splash load Onerror: -1 : 网络超时");
callback(false);
}
private sealed class SplashAdInteractionListener : ISplashAdInteractionListener private sealed class SplashAdInteractionListener : ISplashAdInteractionListener
{ {
......
...@@ -1640,6 +1640,10 @@ public sealed class Example : MonoBehaviour ...@@ -1640,6 +1640,10 @@ public sealed class Example : MonoBehaviour
#endif #endif
} }
public void onTimeout()
{
}
private sealed class SplashAdInteractionListener : ISplashAdInteractionListener private sealed class SplashAdInteractionListener : ISplashAdInteractionListener
{ {
...@@ -1750,7 +1754,12 @@ private sealed class ExpressSplashAdListener : ISplashAdListener ...@@ -1750,7 +1754,12 @@ private sealed class ExpressSplashAdListener : ISplashAdListener
} }
#endif #endif
} }
}
public void onTimeout()
{
}
}
private sealed class ExpressSplashAdInteractionListener : ISplashAdInteractionListener private sealed class ExpressSplashAdInteractionListener : ISplashAdInteractionListener
{ {
......
...@@ -330,7 +330,11 @@ namespace ByteDance.Union ...@@ -330,7 +330,11 @@ namespace ByteDance.Union
UnityDispatcher.PostTask( UnityDispatcher.PostTask(
() => this.listener.OnError(code, message)); () => this.listener.OnError(code, message));
} }
public void onTimeout()
{
UnityDispatcher.PostTask(
() => this.listener.onTimeout());
}
public void onSplashAdLoad(AndroidJavaObject handle) public void onSplashAdLoad(AndroidJavaObject handle)
{ {
var ad = new BUSplashAd(handle); var ad = new BUSplashAd(handle);
......
...@@ -16,7 +16,7 @@ namespace ByteDance.Union ...@@ -16,7 +16,7 @@ namespace ByteDance.Union
/// Invoke when load Ad error. /// Invoke when load Ad error.
/// </summary> /// </summary>
void OnError(int code, string message); void OnError(int code, string message);
void onTimeout();
/// <summary> /// <summary>
/// Invoke when the Ad load success. /// Invoke when the Ad load success.
/// </summary> /// </summary>
......
fileFormatVersion: 2
guid: 6915fe3cccc9344909d4516bf2cd6714
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
...@@ -132,7 +132,7 @@ public class AdDemo : MonoBehaviour ...@@ -132,7 +132,7 @@ public class AdDemo : MonoBehaviour
public void onLastError() public void onLastError()
{ {
Debug.unityLogger.Log("开屏2Error"); Debug.unityLogger.Log("开屏onLastError");
} }
} }
......
...@@ -60,8 +60,8 @@ public class EventUtils ...@@ -60,8 +60,8 @@ public class EventUtils
map["code_id"] = entity.codeId; map["code_id"] = entity.codeId;
map["reqId"] = entity.reqId; map["reqId"] = entity.reqId;
map["slot"] = entity.actionName; map["slot"] = entity.actionName;
map["errorMsg"] = code; map["errorMsg"] = msg;
map["errorCode"] = msg; map["errorCode"] = code;
EventHttp.Instance._PostEvent(JsonMapper.ToJson(map)); EventHttp.Instance._PostEvent(JsonMapper.ToJson(map));
if (entity.pullfail_tracking != null && entity.pullfail_tracking.Count > 0) if (entity.pullfail_tracking != null && entity.pullfail_tracking.Count > 0)
......
...@@ -131,7 +131,7 @@ PlayerSettings: ...@@ -131,7 +131,7 @@ PlayerSettings:
16:10: 1 16:10: 1
16:9: 1 16:9: 1
Others: 1 Others: 1
bundleVersion: 1.0.0 bundleVersion: 1.0.5
preloadedAssets: [] preloadedAssets: []
metroInputSource: 0 metroInputSource: 0
wsaTransparentSwapchain: 0 wsaTransparentSwapchain: 0
...@@ -175,7 +175,7 @@ PlayerSettings: ...@@ -175,7 +175,7 @@ PlayerSettings:
androidSupportedAspectRatio: 1 androidSupportedAspectRatio: 1
androidMaxAspectRatio: 2.1 androidMaxAspectRatio: 2.1
applicationIdentifier: applicationIdentifier:
Android: com.ym.chxxx Android: com.ym.cscmnq
Lumin: com.DefaultCompany.com.unity.template.mobile2D Lumin: com.DefaultCompany.com.unity.template.mobile2D
Standalone: com.DefaultCompany.com.unity.template.mobile2D Standalone: com.DefaultCompany.com.unity.template.mobile2D
iPhone: com.ym.iosawpdd iPhone: com.ym.iosawpdd
...@@ -184,7 +184,7 @@ PlayerSettings: ...@@ -184,7 +184,7 @@ PlayerSettings:
Standalone: 0 Standalone: 0
iPhone: 0 iPhone: 0
tvOS: 0 tvOS: 0
AndroidBundleVersionCode: 1 AndroidBundleVersionCode: 6
AndroidMinSdkVersion: 21 AndroidMinSdkVersion: 21
AndroidTargetSdkVersion: 0 AndroidTargetSdkVersion: 0
AndroidPreferredInstallLocation: 1 AndroidPreferredInstallLocation: 1
...@@ -655,7 +655,7 @@ PlayerSettings: ...@@ -655,7 +655,7 @@ PlayerSettings:
scriptingDefineSymbols: {} scriptingDefineSymbols: {}
platformArchitecture: {} platformArchitecture: {}
scriptingBackend: scriptingBackend:
Android: 1 Android: 0
il2cppCompilerConfiguration: {} il2cppCompilerConfiguration: {}
managedStrippingLevel: {} managedStrippingLevel: {}
incrementalIl2cppBuild: {} incrementalIl2cppBuild: {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment