I have developed cross platform application using Ionic 1 framework,
for the admob I have used cordova-admob-pro plugin.
https://github.com/floatinghotpot/cordova-admob-pro
For the Interstitial showing, used following code portion. When I open up a page, an Interstitial is displayed for a while.
Upto now Every thing is fine.
The problem is when I have attempted second and more times ,Interstitial is not displayed any more until I have killed an application then open it again.
Same problem is seen at both platform Android and IOS.
What should I do?
I have any problem with another banner at the top of the screen, it keeps displayed during application life cycle.
// preppare and load ad resource in background, e.g. at begining of game level
if(AdMob) AdMob.prepareInterstitial( {adId:admobid.interstitial, autoShow:false} );
// show the interstitial later, e.g. at end of game level
if(AdMob) AdMob.showInterstitial();
Each time before you call showInterstitial(), you must call prepareInterstitial() to load ad resource from server, and expect a onAdLoaded event.
In your code, you call showInterstitial() only once when init, which is not enough.
https://github.com/floatinghotpot/cordova-admob-pro/issues/568
Related
I need to have an admob banner on top my Flutter app visible at all times AND not have to care about it being visible after I shuffle my app's pages.
I don't want to touch it, reload on page change, recreate it and so on - waste of time.
So far it's been over a year that I've made it work with two MaterialApps nested inside one another - one parent with SafeArea (banner goes in there) and the second one is where the app actually "lives" and goes about navigating its pages with cool transition effects and so on.
Before telling me how wrong it is - it WORKS. In production app serving thousands of people daily. Zero problems so far.
However, I'd like to know, with all the recent Flutter updates and stuff, maybe there's finally a more elegant solution to this?
When my game starts the welcome screen has quite a few animations that play out. It was working fine until I implemented Unity Ads into my game. Now there is a noticeable lag when this bit of code executes:
Advertisement.Initialize ();.
It only lasts for a second but it is quite nasty. I tried putting the code in a co-routine and calling after the bulk of the heavy animations are completed but it still causes a considerable disruption to the remaining simple animations that are looping.
I'm thinking about putting it inside of my "Earn Button" onClick event but then the user will have to wait for the ads to load up which can take up to 5 seconds in my experience.
Is there a way I can call this code while the splash screen is loading?
I am testing on a Samsung S5 if that helps.
I think it takes long because it will download video Ads and try to cache them into the device. It will take even longer for devices with slow internet.
I assume you tried to use AsyncTask Here , if not, give it a go and Initialize UnityAds on a separate thread and see if it helps.
Another way is to call Initialize() and then check if the Video Ad is ready and put a loading screen while its downloading all the video Ads.
something like
While(! Advertisement.isready())
{
// loading..
}
I am not sure if it downloads videos every time you open the app or once every sometime, you need to ask UnityAds for that.
you get the idea.. hope this helps
I am trying to implement an interstitial ad for iPhone. My code currently works, but the ads are slow to appear (I know that I need to check if an ad is available). Is there a way to initiate iAd at start up, maybe in the appDelegate so that when my view appears the ad is ready?
Here is how my views are laid out.
Gameplay_View -> Score -> Ad -> Gameplay_View
Since I'm using three separate UIViews I'm not sure how to implement the Ad and have it load in a timely manner.
Thanks in advance!
I know there is a line of code available for ads to be preloaded, i haven't managed to try it out yet but if your curious here it is.
This is how i declared my Interstitial Ad (Just as a reference since the line of code uses the name).
var interstitialAd:ADInterstitialAd!
When the game has ended have this line of code and it is 'meant' to preload the interstitial ads for the current view controller (I say again i have not tested this to see if it works, this is just if your curious).
UIViewController.prepareInterstitialAds()
I want to start placing ads in my andengine game and an ad to appear just before my result display screen (for example fruit ninja). Since My result screen is a scene and not an activity, I want an ad to popup after my game play and just before results and on button click the ad disappears. I think there is a class called popupscene, but i am not sure if that is to be used. Can someone help?
I made an example using the GLES1 version of the engine:
https://github.com/zfoley/AndengineAdmobLayoutExample
The main thing is to use a LayoutGameActivity instead of a BaseGameActivity.
LayoutGame activity supports having additional views in addition to the GLSurfaceView.
Once you have that going, its pretty simple to implement the admob API or whatever ad service you are using. In my example I use admob.
Hello I'm trying to get the multitasking work properly, but unfortunately I'm kinda lost. My problem is when I re-enter the game, it takes several seconds for the game to come back and show the pause screen. My question is; is there any way to put some sort of loading screen until the game comes back, so I can at least indicate that its not frozen? I've never used Xcode directly. I'm using Unity 3d to build my game. I made a little bit of research and if I'm not mistaken I'm supposed to use "applicationDidEnterBackground" app delegate method. My question is How can I put a custom loading screen using that method in Xcode?
Thanks
In -applicationDidEnterBackground:, you're given the opportunity to "clean up" the UI before the screenshot is taken. Apple says you should remove "sensitive data" (the screenshots might be persisted to "disk"?), but it also lets you do other things. In one app, we hide the label on a countdown timer so it doesn't appear to jump when you switch back to the app.
To change the "loading screen", simply display a full-screen view over the other views and remove it in -applicationWillEnterForeground:. Alternatively, pause the game in the first place!
(Really, you should be pausing the game in -applicationWillResignActive: which happens when the user double-taps home or the user receives a SMS/notification. I'm pretty sure it's called when the app is backgrounded, too.)