Admob integration in a single activity application with multiple fragments - android

I am trying to develop an application which have a single activity. I have achieved all the functionality using multiple fragments. I am showing advertisement using Admob in OnCreate of the activity.
Question:
Should I shift Admob code to OnCreate of each fragment for more impressions?

No. This might increase impressions but it not increase your revenue (revenue it a function of clicks not impressions) and may well decrease it (you may start getting lower value impressions because your CTR will drop). It will also unnecessarily complicate your code.

Related

Interstitial vs AppOpenAds android

Can someone explain as I can't seems to find a proper post about why use Interstitial or AppOpen ad for fullscreen impression exclusively?
I have read google doc, guidelines and already have experience implementing both types of ads, however why shouldn't I just use Interstitial everywhere where I need fullscreen ad including initial loading and vice versa why shouldn't I use appOpen for transitioning?
Will my app be banned by google if I will show appOpen between nav destinations? Should I prefer certain type for maximizing revenue? Is there any technical difference s in caching/requesting/showing ads.
I just don't understand need in having 2 types of fullscreen ads in my apps as well as I can't find proper discussion about why should I prefer one of them or being unreplaceable one by another.
Interstitial vs AppOpenAds android
AppOpenAds use when user pause an app then come back in the app so app open ad show while on the other hand Interstitial add are typically displayed at natural transition points in the flow of an app, such as between activities.

Adding admob ads to an app on particular activities?

I'm a beginner in android development. The app I develop has 30 activities. I'm in the process of adding admob ads to my app. Can I add ads only to 10 of 30 activities. Is it ok to add ads to only 10 activities, is it correct. If not is there any shortcuts to add ads to all activities. Shortcut in the sense programmatically adding ads to one activity and extending it to all activities.
First thing is that there is no shortcut to add it to all activities.
For putting the ad into the activities you want, put the JAVA and XML code only in the activity you want to place the ad.
Gradle is common for the whole project.
My Personal Advice - Do more code and get the concepts more well before indulging in the Ads. They are a bit complex for beginners.

About AdViews, how many can i implement?

I've got following problem.
I got two different Activities in my Android application. Now I wanted to add an AdView on each of these activities.
It worked for me adding one adView to "BANNER" and the other one to "SMART_BANNER".
But now, when I try to set both AdViews (the one activity and the other activity), to "SMART_BANNER", I noticed that one of these Banners won't show up.
This made me ask several questions:
How many adViews am i allowed to implement in one app?
How many adVies am i allowed to implement in one single activity?
Why doesn't it work when using two SMART_BANNER in one app? Why does it work when using one BANNER and one SMART_BANNER adView in one class?
I hope you can help me.
It is against Admob TOS for you to display 2 AdViews on the one Activity.
But it is totally acceptable to display more than one AdView within your app. But in reality you only want to display AdViews where the user spends most of their time.

0 second load time for Admob Ads in Android

The question is in the context of Admob in Android.
In every activity, the admob ads is taking couple of seconds to load. I want that the Admob Ads should load instantly with the activity.
I have tried couple of solutions but nothing seems to work :(
So i thought of Frameset concept in HTML, if we click on the link, in a particular frame then only that part will refresh and the other part remains static.
So i was hoping for similar solutions in Android, where the admob ads remain static and the rest part of my activity changes accordingly.
Can anyone guide me, on how to implement similar functionality in Android ?
Also if you have any other alternative to the Admob Ads 0 seconds load time, kindly share it.
Admob takes about a couple of seconds because instruction to load admob is called only when activity started. That's why every admob is also reloaded as long as you reload your activity. In addition, this is often a remote call and could take a time.
Solution :
Create a main activity (which contain admob loading) which handle your set of fragments. I mean instead of using activities, you should use fragments handled by only one activity.
So, you can navigate between all of your views using fragment manager without making any change to admob loading (because it owns to main activity)

Admob add within multiple activities

I am trying to add Admob in my android application which consists of over 15 activities. My question is which solution is the best one, considering that I can't extend any "BaseActivity" (for various reasons), as presented in this example: Admob on Multiple Activities? and I don't want to violate any agreements regarding rules making adds requests and their use.
So far i've created a file admob.xml containing the com.admob.android.ads.AdView
and I use "include layout" in each layout ".xml" file loaded in every activity.
Is this OK? Will I have any problems with Google policies or something like that? Or will this implementation cause me losing potential revenue?
That is a reasonable solution and complies with AdMob policies. Just make sure you don't have two banners on the same page.
The Best way is to switch to fragments,
Your main application will be in the main fragment, and your ad in the Ad Fragment.
This way you can switch your previus activities with fragments, and you will need to initialize the ad Fragment only once, also this will prevent new ad request when you create a new activity (which can lower your admob RPM).
Eli

Categories

Resources