Heyzap Unity SDK - whats the best approach to preload or cache ads with different tagID before calling show() - heyzap

I am working on a Unity game that needs to be monetized with Heyzap SDK. I integrated the latest SDK that had some issues earlier and its fixed.
Now I want to know whats the best possible way to preload or cache interstitial and reward ads before calling Show method.
In doc, it says, Fetch right after initializing Heyzap SDK.
What if I have 3 different placements in game ? ie, three different tagID's.
I know that I can make use of HZInterstitialAd.Fetch("tagID1") and so on...
I just want to know that I am doing it in the right way....
So these are my questions.....
1) I am calling HeyzapAds.Start("xxxxxxx") in Awake() of one of my cs scripts. Is Awake() the right function to initialize Heyzap SDK ?
2) Can I call Fetch method subsequently like below. Because I want all these 3 ads with different tagids to be preloaded or cached. Will it cause any network bottleneck because of the subsequent web service calls ? Is it safe to load Ads like this ?
HZInterstitialAd.Fetch(tag1)
HZInterstitialAd.Fetch(tag2)
HZInterstitialAd.Fetch(tag3)
3) In my game, as soon as the user launch the app or when user hard close ( remove from memory ) and launch the app again, I have to show an Ad ( bootup ad ). To achieve this, I used the below code, but it's not working. Could you let me know how to show bootup Ad or show an AD right after initializing Heyzap SDK.
Is there any delegate available to check if the SDK initialized before I attempt to call Show method or Should I rely on Fetch and its respective interstitial or incentivized delegates ?.
HZInterstitialAd.Fetch(tag1)
HZInterstitialAd.Fetch(tag2)
HZInterstitialAd.Fetch(tag3)
HZInterstitialAd.ShowWithOptions(option);
I also tried calling from Android's Activity's Resume and Start to Unity's function that trigger Heyzap interstitial Ad. But its not working either.
Note: If I attempt to call Show after a small pause say 1 or 2 seconds, all calls are working. It seems that calling Show right after initialization is not working. It needs some time to search and Fetch Ads from available networks ?. So whats the recommended approach to show BOOTUP Ad ?

Related

How do I speed up Unity Ads loading time?

Unity Ads usually take around 10 seconds to load ads. I have a functionality in my game to reward gems after watching ads. Currently, I immediately call the Load Ad function once an Ad is played using the Show function. Even then, I cannot play ads continuously. Is there a method to do multiple calls of Load to load ads faster?
I execute the Load function immediately after successful display of the ad. But that still doesn't help.
P.S: I use the unity ads Legacy system for monetization.

Adgamer interstitial ad doesn't show

I'm trying to implement AdGamer SDK in my Unity game. I'm calling AdGamer.InterstitialAds.Show() but it doesn't show anything. Please help
It could be for several reasons:
The interstitial hasn't yet been loaded. So, check AdGamer.InterstitialAd.IsReady() before trying to show an interstitial ad
The SDK hasn't yet been initialized. Make sure to call AdGamer.InitWithGameToken(YOUR_GAME_TOKEN); before calling anything else in the AdGamer SDK. For example, you can do that in Awake() method in a script which you put on some GameObject in the first scene your game loads. Or you could create a static method with the attribute [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
to make it run at game launch before anything else. It can be in any script and there you'd initialize the SDK. The game token you get when you register your game in the AdGamer publisher console.
The initialization of the SDK may take several seconds (e.g. it may need to auto-update), so if you're trying to show an interstitial very early (right at game launch, before the starting screen) the call will likely fail. For such cases you may want to check AdGamer.IsInitialized before doing anything else.
// in any script
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
public static void InitializeAdGamerBeforeEverything()
{
AdGamer.InitWithGameToken(YOUR_GAME_TOKEN);
}
// elsewhere in code
if (AdGamer.IsInitialized && AdGamer.InterstitialAd.IsReady())
{
AdGamer.InterstitialAds.Show();
}
There is no internet connection or some firewall or other settings on your machine prevent the game from connecting with AdGamer servers
Note that the "no_fill" case doesn't exist in AdGamer: it should return at least a cross-promo ad even if no commercial ad is available in your country at the moment.
Also, please be sure to check the SDK documentation (it also comes as a PDF file inside the unitypackage)

Show Test Ads In Editor

Can I show ads from any ad network inside the Editor?
If not, then how do I check that the request was succesful in Editor? You can give an example from any SDK.
When using admob in the unity editor you can not actually view the real ad units or the test ad units. Unity will give you a log message saying that the ad was run, but it will not call the reward call back. You can implement platform specific code using
#if UNITY_EDITOR
your reward call back code goes here
#endif
this way you can trigger the reward call back in unity without watching the ad so the program will still function properly.
You must build the program to actually view the test ads and make sure all the callbacks are working.

What communication to use, updateApplicationContext or sendMessage for constant data sync

I have an iOS shopping list app, where items are added and displayed in a tableView. I want to create a Watch App Extension but I’m thinking of what is the best function call to use in this case, the updateApplicationContext(:) method or the sendMessage(:replyHandler:errorHandler:) method I was reading the documentation but I’m a little confused since both seem to work.
Here is the functionality I’m expecting to have…
What I want is to be able to add items in the iOS app even if the Watch app is Off, which is normal behavior, BUT I want the Watch app to update with whatever is in the tableView (in iOS) as soon as it is turned on and even if the iPhone is not On at the time the Watch is turned on.
In other words, I want the data in the iOS app to always be in sync with the Watch app.
Which is the best function call to use in this case, the updateApplicationContext(_:) method or the sendMessage(_:replyHandler:errorHandler:) method?
Thanks
As for me, I would use updateApplicationContext(_:) since you would want to update it in real time or in the background as it gets connected.
as for this sendMessage(_:replyHandler:errorHandler:) The cons is The isReachable property must currently be true for these methods to succeed. so you might get a slight delay to update your UI until it is reachable and ask for updates.

Tapjoy Screen appears moved up

I'm developing an App for iPhone and we are using the Tapjoy framework. All works fine except two points that I can't solve. If somebody can point me for a solution will be apreciated.
First one:
The tapjoy implements a notification that is called when a new virtual good is downloaded. We saw that when we download a virtual good the download process never finishes and remains in 100% completed. In consequence the notification never is called. This happens randomly for some packages that we uploaded to Tapjoy. To solve that we used a trick, and is that we were looking for the tapjoy code and we saw a notification that is called when the file download reaches the 100%, and we used this one instead the official. This works ok, but in the download screen appears the download process like this: Downloading 100% comleted, instead of Download complete.
Second one:
When the user pushes in the purchase button of tapjoy, we use the following call in order to load the purchase screen:
[TapjoyConnect showVirtualGoodsWithViewController:self];
Randomly this screen appears properly in full screen, but sometimes appears moved up.
Someone had the same problems?
Thanks in advance!
We'll be releasing a new version of the SDK that will fix the notification issue soon, hopefully in a week or two.
Can you give more details about your second issue? What do you mean by the purchase button of tapjoy?
The showVirtualGoodsWithViewController method should only ever be called when you want to display the store view. When purchasing a virtual good, all other subviews are handled by the SDK so you don't need to call that method again.