Return to Video

Demonstrating the Final App

  • 0:00 - 0:03
    So, let's look at the app that
    we will build in this lesson.
  • 0:03 - 0:04
    It will have three activities.
  • 0:04 - 0:08
    The main launcher activity you see here,
    which has two buttons,
  • 0:08 - 0:11
    the banner ad and
    the interstitial ad buttons.
  • 0:11 - 0:13
    Each of these buttons will bring
    you to a separate activity,
  • 0:13 - 0:17
    showing a banner ad and
    an interstitial ad.
  • 0:17 - 0:19
    So when I press on the banner ad button,
  • 0:19 - 0:22
    you will see a banner ad
    being displayed onscreen.
  • 0:22 - 0:25
    And we have this entire area above
    to display your app contents.
  • 0:25 - 0:26
    I can also click on the ad.
  • 0:26 - 0:31
    And you see that we navigate off our app
    to see more information about the ad.
  • 0:31 - 0:34
    And we can also go back and
    continue to interact with our app.
  • 0:34 - 0:36
    And when we are clicking around here,
  • 0:36 - 0:39
    you can see toast messages
    appear on the screen.
  • 0:39 - 0:42
    These are messages that
    our app will generate so
  • 0:42 - 0:45
    you can see how the app
    interacts with the add and
  • 0:45 - 0:50
    also note that the banner acts as text
    banner because this is a test ad.
  • 0:50 - 0:54
    And what I will tell you now is
    very important, so pay attention.
  • 0:54 - 0:58
    When we are developing our app, we will
    use test ads because advertisers do
  • 0:58 - 1:03
    not and should not have to pay for
    real ads while you are developing.
  • 1:03 - 1:07
    Using real ads during development is
    a violation against the terms and
  • 1:07 - 1:10
    conditions and it can result
    in your accounts being banned.
  • 1:10 - 1:14
    So this is really, really important.
  • 1:14 - 1:16
    Now, let's go back and
    look at the other parts of the app.
  • 1:17 - 1:20
    We can also click on
    the interstitial app button.
  • 1:20 - 1:24
    And that brings us to another
    activity with two buttons here.
  • 1:24 - 1:27
    So we talked about, interstitial
    ads use the entire screen when they
  • 1:27 - 1:30
    are displayed and
    they also support video content.
  • 1:30 - 1:33
    Therefore, we first load
    the interstitial ads and
  • 1:33 - 1:35
    after they've been loaded,
    we can display them.
  • 1:37 - 1:39
    So this button here will
    load an interstitial ad.
  • 1:39 - 1:42
    You can see that it's loaded and
    now we have the option to show the ad.
  • 1:44 - 1:47
    So we press on this show button and
    here, you can see the ad come up.
  • 1:48 - 1:52
    And again, when developing our app,
    we use test ads.
  • 1:53 - 1:57
    And that's what you see here,
    a test interstitial ad.
  • 1:57 - 2:00
    And as with banner ads, we can click
    on the ad which will bring us to
  • 2:00 - 2:01
    the content and then we can go back.
  • 2:03 - 2:05
    All right, so
    that's the app we're going to build.
  • 2:05 - 2:07
    So let's get right to it and
    do some coding.
  • 2:08 - 2:12
    So let's get you started building
    an app that can show ads.
  • 2:12 - 2:15
    Some of these steps we assume you
    are familiar with since you should
  • 2:15 - 2:17
    have taken the location
    lesson before this one.
  • 2:17 - 2:22
    So in Android Studio, I want you to do
    the following things, create a project
  • 2:22 - 2:27
    with a blank activity, add the metadata
    com.google.android.gms.version
  • 2:27 - 2:31
    to the manifest, add the dependencies
    to your build.gradle file.
  • 2:31 - 2:35
    And also add the following
    permissions to the manifest,
  • 2:35 - 2:37
    android.permission.INTERNET and
  • 2:37 - 2:41
    android.permission.access_network_st-
    ate".
  • 2:41 - 2:43
    The Internet permission is required
    since we're going to fetch
  • 2:43 - 2:45
    ads from the Internet.
  • 2:45 - 2:48
    And the access network state allows
    Admob to check if an Internet connection
  • 2:48 - 2:52
    is available before trying to fetch
    the ad and check here when you're done.
Title:
Demonstrating the Final App
Description:

more » « less
Video Language:
English
Team:
Udacity
Project:
ud876-3 - Google Play Services - AdMob
Duration:
02:54

English subtitles

Revisions Compare revisions