Tag Archives: mobile_ads_sdk

Mobile Ads Garage #3: Banner ad best practices

Ever wondered about the best ways to monetize with banner ads while maintaining a great user experience? If so, the Mobile Ads Garage is here to help. In the third episode, Andrew and Gary the Graphics Guy cover how to integrate banner ads into a mobile app's UX, with a little help from Aunt Betty, hairless cats, and discount moose repellent. You'll see detailed breakdowns of things to avoid, plus reliable best practices that you can take back to your own apps. As always, links to guides, samples, and other resources are included.


If you like the video, save the Mobile Ads Garage playlist to your YouTube Playlist collection and you'll never miss an episode.

We’d love to hear which AdMob features you’d like to learn more about. The comment sections for the videos are open, and you're welcome to toss out ideas for new episodes and examples you'd like to see. If you have a technical question relating to something discussed in one of the episodes, you can bring it to our support forum.

Mobile Ads Garage: Episode 3 – Banner Best Practices

Ever wondered about the best ways to monetize with banner ads while maintaining a great user experience? If so, the Mobile Ads Garage is here to help.

In the third episode, Andrew and Gary the Graphics Guy cover how to integrate banner ads into a mobile app's UX, with a little help from Aunt Betty, hairless cats, and discount moose repellent. You'll see detailed breakdowns of things to avoid, plus reliable best practices that you can take back to your own apps. As always, links to guides, samples, and other resources are included.



If you like the video, save the Mobile Ads Garage playlist to your YouTube Playlist collection and you'll never miss an episode.
We’d love to hear which AdMob features you’d like to learn more about. The comment sections for the videos are open, and you're welcome to toss out ideas for new episodes and examples you'd like to see. If you have a technical question relating to something discussed in one of the episodes, you can bring it to our support forum.

Source: Inside AdMob


Handling Android ad events in Unity

Registering for banner and interstitial ad events is a handy way for Unity developers using the Google Mobile Ads Unity Plugin to track ad lifecycle events -- things like when an ad is loaded or when an ad click causes the app to be backgrounded. For Unity developers deploying to the Android platform, though, it's important to be aware that ad event handler methods are not invoked on the main thread. As a consequence, Unity methods that must be called on the main thread cannot be executed within ad event handler methods.

Consider the following example:


AudioSource audio = GetComponent<AudioSource>();
...
public void HandleInterstitialClosed(object sender, EventArgs args)
{
audio.mute = false;
}

The code above, which modifies the volume of an audio source from within an ad event handler method, results in the following error:

ArgumentException: set_volume can only be called from the main thread

To get around this, we recommend setting a flag when an event happens, and polling for a state change within the Update() method of your Unity script.

For actions required to be performed on the main thread after showing an ad, set a flag on the OnAdClosed ad event. The update method can poll the value of this flag and perform actions as necessary. The code below illustrates how to implement this approach.


private bool interstitialClosed;

void Start()
{
InterstitialAd interstitial = new InterstitialAd("YOUR_AD_UNIT_ID");
interstitial.OnAdClosed += HandleInterstitialClosed;
interstitialClosed = false;
...
}

void Update()
{
if (interstitialClosed)
{
// Perform actions here.
audio.mute = false;
}
}

public void HandleInterstitialClosed(object sender, EventArgs args)
{
interstitialClosed = true;
}

If you have any questions about Unity integration, you can reach us on our forum. You can also find our quick-start guide here. Remember that you can also find us on Google+, where we have updates on all of our Google Ads developer products.

Mobile Ads Garage Episode 2: Implementing AdMob Banner Ads

The Mobile Ads Garage has returned with its second episode. In this video, you'll see screencasts and detailed breakdowns of how to implement banner ads for both iOS and Android. Plus, you'll get links to guides, samples, and other great resources.


If you like the video, save the Mobile Ads Garage playlist to your YouTube Playlist collection and you'll never miss an episode.

We’d love to hear which AdMob features you’d like to learn more about. The comment sections for the videos are open, and you're welcome to toss out ideas for new episodes and examples you'd like to see. If you have a technical question relating to something discussed in one of the episodes, you can bring it to our support forum.

The Mobile Ads Garage: Episode 2 – Implementing AdMob Banner Ads

The Mobile Ads Garage has returned with its second episode. In this video, you'll see screencasts and detailed breakdowns of how to implement banner ads for both iOS and Android. Plus, you'll get links to guides, samples, and other great resources.


If you like the video, save the Mobile Ads Garage playlist to your YouTube Playlist collection and you'll never miss an episode.

We’d love to hear which AdMob features you’d like to learn more about. The comment sections for the videos are open, and you're welcome to toss out ideas for new episodes and examples you'd like to see. If you have a technical question relating to something discussed in one of the episodes, you can bring it to our support forum.

For more tips on app monetization, be sure to stay connected on all things AdMob by following our Twitter, LinkedIn and Google+ pages.

Source: Inside AdMob


What you need to know to install AdMob on your app

Two weeks ago, we shared a video in which some of the industry’s most prominent app developers shared. In the coming weeks, we will continue to have tips on app design, but let’s now look at installing AdMob. Monetizing your app with AdMob is a requirement for the contest, so it’s important that you install the program correctly. Check out our AdMob Developers site for both Android and iOS to learn about the entire process for installing AdMob to your app.

Here’s a video that you can reference as well, as your team configures AdMob in your app for the first time.



If you run into issues with installation or need help with any troubleshooting, be sure to head to the Google Developers forum, where any questions or troubleshooting can be addressed. Continue to follow us on AdMob G+ and Twitter, and keep an eye on #AdMobSAC16 too, for regular updates on the challenge.

Source: Inside AdMob


The Mobile Ads Garage: A new video series about using the Google Mobile Ads SDK

Today, the first episode of the Mobile Ads Garage hits YouTube! The Mobile Ads Garage is a new series that covers how to use the Mobile Ads SDK to display ads from AdMob and Doubleclick For Publishers. Each episode will cover one aspect of the SDK, break down a feature, and show screencasts of real implementations on both Android and iOS – all in a friendly format.

The series will make its home on YouTube's Google Developer Channel, where you'll find the first episode in the Mobile Ads Garage playlist along with a sneak peek of the next four.


In addition to being a new way that people can find out about the SDK and how to use it, the series is a way for publishers to let us know what features they'd like to learn more about. The comment sections for the videos are open, and you're welcome to toss out ideas for new episodes and examples you'd like to see. If you have a technical question relating to something discussed in one of the episodes, you can bring it to our support forum.

The Mobile Ads Garage: A new video series about using the Google Mobile Ads SDK

Cross-posted from the Google Ads Developer blog.

Today, the first episode of the Mobile Ads Garage hits YouTube! The Mobile Ads Garage is a new series that covers how to use the Mobile Ads SDK to display ads from AdMob and Doubleclick For Publishers. Each episode will cover one aspect of the SDK, break down a feature, and show screencasts of real implementations on both Android and iOS – all in a friendly format.

The series will make its home on YouTube's Google Developer Channel, where you'll find the first episode in the Mobile Ads Garage playlist along with a sneak peek of the next four.



In addition to being a new way that people can find out about the SDK and how to use it, the series is a way for publishers to let us know what features they'd like to learn more about. The comment sections for the videos are open, and you're welcome to toss out ideas for new episodes and examples you'd like to see. If you have a technical question relating to something discussed in one of the episodes, you can bring it to our support forum.

Source: Inside AdMob


Google Mobile Ads fully supports Swift

Since its release a few years ago, Swift has evolved into a dynamic, modern programming language for developing iOS apps. With its growing popularity and open source, we’ve seen an increase in requests from our publishers to fully support Swift in the Google Mobile Ads SDK. We responded by releasing a complete set of example apps built in Swift, adding Swift code snippets throughout our developer docs, and adding Swift API reference docs to our developer sites.

Our GitHub repo now has Swift example apps for banners, interstitials, and native ads for both AdMob and DFP. We’ve also added a Swift version of our API Demo app. The API Demo app demonstrates features of the Google Mobile Ads SDK, such as new ways to customize ad requests, experiment with multiple ad sizes, and compare AdMob and DFP technologies, to help you improve the user experience and maximize ad revenue.

We’ve also added Swift code snippets to our AdMob, DFP, and AdX developer docs. With nicely formatted widgets that display Swift and Objective-C code side by side, you can now easily compare SDK implementations in both Swift and Objective-C.

Finally, we’ve added Swift API reference docs to our AdMob and DFP developer sites, providing full documentation of our iOS Google Mobile Ads SDK. Now you have access to API reference docs for both Swift and Objective-C, making it easier to integrate with our SDK.

The Google Mobile Ads SDK team is committed to supporting Swift, and we’ll continue to update our SDK, developer docs, and example apps to ensure we provide publishers with full support for the latest version of Swift. Whether you currently develop your iOS apps in Swift, or have plans to do so in the future, we hope the actions we’ve taken to support Swift in our SDK will help make your experience with Swift more enjoyable and your transition to Swift a whole lot easier.

If you have any questions or feedback regarding our SDK or Swift support, feel free to contact us through our forum.

Rewarded Video Support for AdMob Mediation

At the 2016 Games Developer’s Conference, we announced a new addition to the AdMob mediation platform: rewarded video ads. This new avenue for monetization offers users the option to engage with ads in exchange for in-app rewards. Our growing list of mediation partners includes:

  • Unity Ads
  • Chartboost
  • Vungle
  • AdColony
  • AppLovin
  • Fyber
  • Upsight

Choosing AdMob for your rewarded video mediation platform gives you access to ad content from all of these networks, and allows you to develop against a single API from AdMob.

Rewarded video ads are requested and displayed using the the new RewardedVideoAd and GADRewardBasedVideoAd classes. Here’s an example showing how to request a rewarded video ad on Android:


RewardedVideoAd mRewardedVideoAd = MobileAds.getRewardedVideoAdInstance(this);
mRewardedVideoAd.setRewardedVideoAdListener(this);
mRewardedVideoAd.loadAd(AD_UNIT_ID, new AdRequest.Builder().build());

And here’s the iOS equivalent:


GADURewardBasedVideoAd *rewardedVideo = [GADRewardBasedVideoAd sharedInstance];
rewardedVideo.delegate = self;
[rewardedVideo loadRequest:request withAdUnitID:adUnitID];

You can find additional documentation on rewarded video ads in our publishers get started guides (Android | iOS). Mediation documentation not specific to rewarded video ads can be found in the mediation get started guides (Android | iOS).

If you have any questions about rewarded video mediation, you can reach us on our forum. You can also find us on Google+, where we have updates on all of our Google Ads developer products.