使用topon初始化kwai广告
This commit is contained in:
parent
f218790d71
commit
88918b8691
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"recommendations": [
|
||||||
|
"visualstudiotoolsforunity.vstuc"
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "Attach to Unity",
|
||||||
|
"type": "vstuc",
|
||||||
|
"request": "attach"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,56 @@
|
||||||
|
{
|
||||||
|
"files.exclude": {
|
||||||
|
"**/.DS_Store": true,
|
||||||
|
"**/.git": true,
|
||||||
|
"**/.gitmodules": true,
|
||||||
|
"**/*.booproj": true,
|
||||||
|
"**/*.pidb": true,
|
||||||
|
"**/*.suo": true,
|
||||||
|
"**/*.user": true,
|
||||||
|
"**/*.userprefs": true,
|
||||||
|
"**/*.unityproj": true,
|
||||||
|
"**/*.dll": true,
|
||||||
|
"**/*.exe": true,
|
||||||
|
"**/*.pdf": true,
|
||||||
|
"**/*.mid": true,
|
||||||
|
"**/*.midi": true,
|
||||||
|
"**/*.wav": true,
|
||||||
|
"**/*.gif": true,
|
||||||
|
"**/*.ico": true,
|
||||||
|
"**/*.jpg": true,
|
||||||
|
"**/*.jpeg": true,
|
||||||
|
"**/*.png": true,
|
||||||
|
"**/*.psd": true,
|
||||||
|
"**/*.tga": true,
|
||||||
|
"**/*.tif": true,
|
||||||
|
"**/*.tiff": true,
|
||||||
|
"**/*.3ds": true,
|
||||||
|
"**/*.3DS": true,
|
||||||
|
"**/*.fbx": true,
|
||||||
|
"**/*.FBX": true,
|
||||||
|
"**/*.lxo": true,
|
||||||
|
"**/*.LXO": true,
|
||||||
|
"**/*.ma": true,
|
||||||
|
"**/*.MA": true,
|
||||||
|
"**/*.obj": true,
|
||||||
|
"**/*.OBJ": true,
|
||||||
|
"**/*.asset": true,
|
||||||
|
"**/*.cubemap": true,
|
||||||
|
"**/*.flare": true,
|
||||||
|
"**/*.mat": true,
|
||||||
|
"**/*.meta": true,
|
||||||
|
"**/*.prefab": true,
|
||||||
|
"**/*.unity": true,
|
||||||
|
"build/": true,
|
||||||
|
"Build/": true,
|
||||||
|
"Library/": true,
|
||||||
|
"library/": true,
|
||||||
|
"obj/": true,
|
||||||
|
"Obj/": true,
|
||||||
|
"ProjectSettings/": true,
|
||||||
|
"temp/": true,
|
||||||
|
"Temp/": true
|
||||||
|
},
|
||||||
|
"dotnet.defaultSolution": "SDK_UnityMoney.sln",
|
||||||
|
"git.ignoreLimitWarning": true
|
||||||
|
}
|
|
@ -4,6 +4,7 @@ using BigoAds.Scripts.Platforms.Android;
|
||||||
using KwaiAds.Scripts.Api;
|
using KwaiAds.Scripts.Api;
|
||||||
using KwaiAds.Scripts.Common;
|
using KwaiAds.Scripts.Common;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using WZ;
|
||||||
|
|
||||||
namespace KwaiAds.Scripts.Platforms.Android
|
namespace KwaiAds.Scripts.Platforms.Android
|
||||||
{
|
{
|
||||||
|
@ -126,8 +127,11 @@ namespace KwaiAds.Scripts.Platforms.Android
|
||||||
{
|
{
|
||||||
AndroidJavaObject contextObject = currentActivity.Call<AndroidJavaObject>("getApplicationContext");
|
AndroidJavaObject contextObject = currentActivity.Call<AndroidJavaObject>("getApplicationContext");
|
||||||
Debug.Log("Android Context: " + contextObject.Call<string>("toString"));
|
Debug.Log("Android Context: " + contextObject.Call<string>("toString"));
|
||||||
|
if (!KwaiAdsManager.UseToponInitKwai())
|
||||||
|
{
|
||||||
kwaiAdSdkClass.CallStatic("init", contextObject, sdkConfigBuilder.Call<AndroidJavaObject>("build"));
|
kwaiAdSdkClass.CallStatic("init", contextObject, sdkConfigBuilder.Call<AndroidJavaObject>("build"));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.LogError("Current Activity not found.");
|
Debug.LogError("Current Activity not found.");
|
||||||
|
|
Binary file not shown.
|
@ -48,18 +48,34 @@ namespace WZ
|
||||||
KwaiFloorIvManager.Instance.InitializeWithFloors();
|
KwaiFloorIvManager.Instance.InitializeWithFloors();
|
||||||
}
|
}
|
||||||
|
|
||||||
var useToponKwai = RushSDKManager.Instance.GetRemoteConfigStr("use_topon_kwai","1").Equals("1");
|
LoggerUtils.Debug("KwaiAdsManager Initialize start" + _appId + " token:" + _token + " rewardAdUnitId:" + _rewardAdUnitId + " interstitialAdUnitId:" + _interstitialAdUnitId + " useToponKwai:" + UseToponInitKwai());
|
||||||
LoggerUtils.Debug("KwaiAdsManager Initialize start" + _appId + " token:" + _token + " rewardAdUnitId:" + _rewardAdUnitId + " interstitialAdUnitId:" + _interstitialAdUnitId+ " useToponKwai:" + useToponKwai);
|
|
||||||
|
|
||||||
if (useToponKwai)
|
if (UseToponInitKwai())
|
||||||
{
|
{
|
||||||
|
if (!string.IsNullOrEmpty(_appId) && !string.IsNullOrEmpty(_token))
|
||||||
|
{
|
||||||
|
ToponKwaiUtils.InitSDK(_appId, _token, (res, msg) =>
|
||||||
|
{
|
||||||
|
LoggerUtils.Debug("KwaiAdsManager is init topon" + ToponKwaiUtils.IsInit() + " res:" + res.ToString() + " msg:" + msg);
|
||||||
|
if (res)
|
||||||
|
{
|
||||||
|
var kwaiAdConfig = new KwaiAds.Scripts.Api.KwaiAdConfig.Builder()
|
||||||
|
.SetAppId(_appId)
|
||||||
|
.SetToken(_token)
|
||||||
|
.SetDebugLog(false)
|
||||||
|
.Build();
|
||||||
|
|
||||||
|
KwaiAds.Scripts.Api.KwaiAdsSdk.Initialize(kwaiAdConfig, new InitResultCallbackImpl());
|
||||||
_initialized = true;
|
_initialized = true;
|
||||||
LoadInterstitial();
|
LoadInterstitial();
|
||||||
LoadRewarded();
|
LoadRewarded();
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LoggerUtils.Debug("KwaiAdsManager RefreshAdsData" + _appId + " token:" + _token + " rewardAdUnitId:" + _rewardAdUnitId + " interstitialAdUnitId:" + _interstitialAdUnitId+ " init:" + _initialized);
|
LoggerUtils.Debug("KwaiAdsManager RefreshAdsData" + _appId + " token:" + _token + " rewardAdUnitId:" + _rewardAdUnitId + " interstitialAdUnitId:" + _interstitialAdUnitId + " init:" + _initialized);
|
||||||
if (string.IsNullOrEmpty(_appId) || string.IsNullOrEmpty(_token) || _initialized) return;
|
if (string.IsNullOrEmpty(_appId) || string.IsNullOrEmpty(_token) || _initialized) return;
|
||||||
var kwaiAdConfig = new KwaiAds.Scripts.Api.KwaiAdConfig.Builder()
|
var kwaiAdConfig = new KwaiAds.Scripts.Api.KwaiAdConfig.Builder()
|
||||||
.SetAppId(_appId)
|
.SetAppId(_appId)
|
||||||
|
@ -72,6 +88,10 @@ namespace WZ
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool UseToponInitKwai()
|
||||||
|
{
|
||||||
|
return RushSDKManager.Instance.GetRemoteConfigStr("use_topon_kwai", "1").Equals("1");
|
||||||
|
}
|
||||||
|
|
||||||
public void RefreshAdsData()
|
public void RefreshAdsData()
|
||||||
{
|
{
|
||||||
|
|
|
@ -21,7 +21,7 @@ public class RushSDKManager : D_MonoSingleton<RushSDKManager>
|
||||||
|
|
||||||
public static string GetSDKVersion()
|
public static string GetSDKVersion()
|
||||||
{
|
{
|
||||||
return "1.0.4.9";
|
return "1.0.5.0";
|
||||||
}
|
}
|
||||||
protected override void Initialized()
|
protected override void Initialized()
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,3 +1,17 @@
|
||||||
|
# Version 1.0.5.0 2025.10.2
|
||||||
|
|
||||||
|
## Bugs
|
||||||
|
|
||||||
|
- None
|
||||||
|
|
||||||
|
## Known issues
|
||||||
|
|
||||||
|
- None
|
||||||
|
|
||||||
|
## Changelog
|
||||||
|
|
||||||
|
- 修复topon初始化kwai广告后,kwai广告加载失败问题
|
||||||
|
|
||||||
# Version 1.0.4.9 2025.10.20
|
# Version 1.0.4.9 2025.10.20
|
||||||
|
|
||||||
## Bugs
|
## Bugs
|
||||||
|
@ -12,8 +26,6 @@
|
||||||
|
|
||||||
- 修复EFSDK事件上报
|
- 修复EFSDK事件上报
|
||||||
|
|
||||||
# Version 1.0.4.9 2025.10.20
|
|
||||||
|
|
||||||
# Version 1.0.4.7 2025.10.17
|
# Version 1.0.4.7 2025.10.17
|
||||||
|
|
||||||
## Bugs
|
## Bugs
|
||||||
|
|
Loading…
Reference in New Issue