fix:1、sdk更换。2、修复bug

This commit is contained in:
2026-07-07 14:03:12 +08:00
parent 63b530f245
commit e3b0b9b008
1617 changed files with 134668 additions and 62343 deletions
@@ -0,0 +1,93 @@
using UnityEngine;
using AnyThinkAds.Common;
using AnyThinkAds.Api;
namespace AnyThinkAds.Android
{
public class ATDownloadClient : AndroidJavaProxy,IATDownloadClient
{
private AndroidJavaObject downloadHelper;
private ATDownloadAdListener anyThinkListener;
public ATDownloadClient() : base("com.thinkup.unitybridge.download.DownloadListener")
{
}
public void setListener(ATDownloadAdListener listener)
{
Debug.Log("ATDownloadClient : setListener");
anyThinkListener = listener;
if (downloadHelper == null)
{
downloadHelper = new AndroidJavaObject(
"com.thinkup.unitybridge.download.DownloadHelper", this);
}
}
public void onDownloadStart(string placementId, string callbackJson, long totalBytes, long currBytes, string fileName, string appName)
{
Debug.Log("onDownloadStart...unity3d.");
if(anyThinkListener != null){
anyThinkListener.onDownloadStart(placementId, new ATCallbackInfo(callbackJson), totalBytes, currBytes, fileName, appName);
}
}
public void onDownloadUpdate(string placementId, string callbackJson, long totalBytes, long currBytes, string fileName, string appName)
{
Debug.Log("onDownloadUpdate...unity3d.");
if (anyThinkListener != null)
{
anyThinkListener.onDownloadUpdate(placementId, new ATCallbackInfo(callbackJson), totalBytes, currBytes, fileName, appName);
}
}
public void onDownloadPause(string placementId, string callbackJson, long totalBytes, long currBytes, string fileName, string appName)
{
Debug.Log("onDownloadPause...unity3d.");
if (anyThinkListener != null)
{
anyThinkListener.onDownloadPause(placementId, new ATCallbackInfo(callbackJson), totalBytes, currBytes, fileName, appName);
}
}
public void onDownloadFinish(string placementId, string callbackJson, long totalBytes, string fileName, string appName)
{
Debug.Log("onDownloadFinish...unity3d.");
if (anyThinkListener != null)
{
anyThinkListener.onDownloadFinish(placementId, new ATCallbackInfo(callbackJson), totalBytes, fileName, appName);
}
}
public void onDownloadFail(string placementId, string callbackJson, long totalBytes, long currBytes, string fileName, string appName)
{
Debug.Log("onDownloadFail...unity3d.");
if (anyThinkListener != null)
{
anyThinkListener.onDownloadFail(placementId, new ATCallbackInfo(callbackJson), totalBytes, currBytes, fileName, appName);
}
}
public void onInstalled(string placementId, string callbackJson, string fileName, string appName)
{
Debug.Log("onInstalled...unity3d.");
if (anyThinkListener != null)
{
anyThinkListener.onInstalled(placementId, new ATCallbackInfo(callbackJson), fileName, appName);
}
}
}
}