Closed orhnzsy closed 4 years ago
Hey @orhnzsy - Do you mind sharing integration code on the enum definition and how it's being passed into our APIs?
This is our show ad function we are sending an enum into this function then we are converting this enum with ToString function for sending to placements.
` public void ShowPlacement(Placements placementType, System.Action
if (Application.isEditor)
{
if (result != null)
{
Timing.RunCoroutine(CallVideoResultCo(result));
Debug.LogError("DO NOT FORGET TO TEST IN MOBILE");
}
//Debug.LogWarning("Ads are not avaible in editor.");
return;
}
//#if (UNITY_ANDROID || UNITY_IOS) && !UNITY_EDITOR MaxSdk.SetMuted(false); AdTypes adType = GetAdType(placementType); switch (adType) { case AdTypes.RewardedVideo: EventManager.Send(EventRewardedVideoClick.Create(placementType)); _rewardedVideoResult = result; if (MaxSdk.IsRewardedAdReady(EXPENSIVE_rewardedAdUnitId)) { Debug.Log("Placement Type: " + placementType.ToString()); MaxSdk.ShowRewardedAd(EXPENSIVE_rewardedAdUnitId, placementType.ToString()); } else if (MaxSdk.IsRewardedAdReady(rewardedAdUnitId)) { Debug.Log("Placement Type: " + placementType.ToString()); MaxSdk.ShowRewardedAd(rewardedAdUnitId, placementType.ToString()); } else { LoadRewardedAd(); Debug.LogError("no rewarded video avaible"); } break; case AdTypes.Interstitial: EventManager.Send(EventShowInterstitial.Create()); if (MaxSdk.IsInterstitialReady(interstitialAdUnitId)) { MaxSdk.ShowInterstitial(interstitialAdUnitId, placementType.ToString()); } else { LoadInterstitial(); Debug.LogError("no interstitial avaible"); }
break;
default:
break;
}
//#endif }`
Placements are enums like this public enum Placements { FreeChest,// DoubleRewards, MissionSkip, MissionDoubleReward,// GameEndFullScreen, FreeRewards,// MatchLimit,// GameEndSpin,// WeaponRent,// CardGame,// WeaponUpgradeOfferRewarded,// ArmorUpgradeOfferRewarded, NONE }
This is our init function when sdk initialization finished, we are registering callbacks for ads then start loading ads for initting
public void InitAgent() { InitInterstitial(); MaxSdkCallbacks.OnSdkInitializedEvent += (MaxSdkBase.SdkConfiguration sdkConfiguration) => { // AppLovin SDK is initialized, start loading ads OnSDKInitialized(); }; MaxSdk.SetSdkKey("sdk-key"); MaxSdk.InitializeSdk(); }
Can you explain exactly what should I put in the account details? @angelwu0409 Thank you.
Hi @orhnzsy, Sorry about the late reply! We just need your account email, the application that is having the issues and that should be enough to start :).
@orhnzsy - Has the issue been resolved?
@thomasmso yes issue has been resolved but i don't know what was the problem, the null placement is gone.
We are using enums for placements. But we are seeing one placement is empty in dashboard, and there is so many request with that.I think some ad requests (with placements) calling with null placements. or shown as null in dashboard. Is can be sdk issue? I am asking because i don't know what is the problem. Enums can not be null in c# language. Thank you for help. We don't use ad requests in editor. by the way.