1 Mobile Computing Monetizing An App Copyright 2014 by Janson Industries.

Slides:



Advertisements
Similar presentations
All About Android Introduction to Android 1. Creating a New App “These aren’t the droids we’re looking for.” Obi-wan Kenobi 1. Bring up Eclipse. 2. Click.
Advertisements

Hello world Follow steps under the sections “Create an AVD” and “Create a New Android Project” at
Application Fundamentals. See: developer.android.com/guide/developing/building/index.html.
Who Am I And Why Am I Here I’m professor Stephen Fickas in CIS – you can call me Steve. I have a research group that works with mobile devices (since 1995!)
User Interface Android Applications. Activities An activity presents a visual user interface. Each activity is given a default window to draw in. The.
Android Application Development with Java UPenn CS4HS 2011 Chris Murphy
Introduction to AppInventor Dr. José M. Reyes Álamo.
Android Development (Basics)
Android Application Development Tutorial. Topics Lecture 5 Overview Overview of Networking Programming Tutorial 2: Downloading from the Internet.
Android Application Development 2013 PClassic Chris Murphy 1.
Mobile Programming Lecture 1 Getting Started. Today's Agenda About the Eclipse IDE Hello, World! Project Android Project Structure Intro to Activities,
Introduction to Android Programming Content Basic environmental structure Building a simple app Debugging.
Android development the first app. Andoid vs iOS which is better? Short answer: neither Proponents on both sides For an iOS side, see this article on.
Introducing the Sudoku Example
Microsoft Outlook Web Application (OWA)
Google Maps Android API v2 吳俊興 國立高雄大學 資訊工程學系 CSF645 – Mobile Computing 行動計算
 Understanding an activity  Starting an activity  Passing information between activities  Understanding intents  Understanding the activity lifecycle.
CS5103 Software Engineering Lecture 08 Android Development II.
 First time student activates their google account, they need to go to an internet browser and go to  drive.google.com/a/students.macon.k12.nc.usdrive.google.com/a/students.macon.k12.nc.us.
1 Mobile Computing Set Up Copyright 2015 by Janson Industries.
Favorite Twitter® Searches App Android How to Program © by Pearson Education, Inc. All Rights Reserved.
Hello world Follow steps under the sections “Create an AVD” and “Create a New Android Project” at
Chapter 2: Simplify! The Android User Interface
PARSING FACEBOOK DATA FOR ANDROID 1. Step by Step  Import Android SDK  Get the hash key  Create a new app  Create a new project in Eclipse 
Basic Android Tutorial USF’s Association for Computing Machinery.
CSCI 6962: Server-side Design and Programming Introduction to Java Server Faces.
Mobile Programming Lecture 6
DUE Hello World on the Android Platform.
CS378 - Mobile Computing Intents.
1 Announcements Homework #2 due Feb 7 at 1:30pm Submit the entire Eclipse project in Blackboard Please fill out the when2meets when your Project Manager.
Chapter 2 The Android User Interface. Objectives  In this chapter, you learn to:  Develop a user interface using the TextView, ImageView, and Button.
CS378 - Mobile Computing Intents. Allow us to use applications and components that are part of Android System – start activities – start services – deliver.
Android Boot Camp for Developers Using Java, 3E
Setting up and getting going with…. MIT App Inventor.
Android Hello World 1. Click on Start and type eclipse into the textbox 2.
Cosc 4730 Android Fragments. Fragments You can think of a fragment as a modular section of an activity, which has its own lifecycle, receives its own.
ANDROID – DRAWING IMAGES – SIMPLE EXAMPLE IN INTERFACE AND EVENT HANDLING L. Grewe.
First Venture into the Android World Chapter 1 Part 2.
Webview and Web services. Web Apps You can make your web content available to users in two ways in a traditional web browser in an Android application,
Announcements Homework #2 will be posted after class due Thursday Feb 7, 1:30pm you may work with one other person No office hours tonight (sorry!) I will.
Mobile Programming Lecture 3 Debugging. Lecture 2 Review What widget would you use to allow the user to enter o a yes/no value o a range of values from.
HW#9 Clues CSCI 571 Fall, HW#9 Prototype
MOBILE COMPUTING D10K-7D02 MC05: Android UI Design Dr. Setiawan Hadi, M.Sc.CS. Program Studi S-1 Teknik Informatika FMIPA Universitas Padjadjaran.
Setting up google Adsense Account Please follow the instructions given in the slides to set up the google adsense account Please follow the instructions.
How Your Customers Will Pay Online & by Phone
CIS Intro to JAVA Lecture Notes Set July-05 GUI Programming –TextField Action Listeners, JEditorPane action listeners, HTML in a JEditorPane,
PAYware Mobile Android Comparison June 2013 For Internal Use Only.
Chapter 12© copyright Janson Industries Java Server Faces ▮ Explain the JSF framework ▮ SDO (service data objects) ▮ Facelets ▮ Pagecode classes.
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Android Boot Camp.
Cosc 5/4735 YouTube API. YouTube The YouTube Android Player API enables you to incorporate video playback functionality into your Android applications.
CMPE419 Mobile Application Development Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department Asst.Prof.Dr.Ahmet Ünveren
Cosc 5/4730 Support design library. Support Design library Adds (API 9+) back support to a number of 5.0 lollipop widgets and material design pieces –
Downloading and Installing GRASP-AF Workshop Ian Robson Information Analyst, North of England Cardiovascular Network.
CMPE419 Mobile Application Development Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department Asst.Prof.Dr.Ahmet Ünveren
CMPE419 Mobile Application Development Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department Asst.Prof.Dr.Ahmet Ünveren
Chapter 2: Simplify! The Android User Interface
Lab7 – Appendix.
Introduction to android
GUI Programming Fundamentals
Cosc 5/4735 AdMob for Android.
ITEC535 – Mobile Programming
Sensors, maps and fragments:
Android SDK & App Development
CIS 470 Mobile App Development
CIS 470 Mobile App Development
CA16R405 - Mobile Application Development (Theory)
BMI Android Application will take weight and height from the users to calculate Body Mass Index (BMI) with the information, whether user is underweight,
CIS 470 Mobile App Development
Korea Software HRD Center
Android Sensor Programming
Presentation transcript:

1 Mobile Computing Monetizing An App Copyright 2014 by Janson Industries

2 Objectives ▀ Learn about: u The various ad companies u Ad measurements u AdViews u Define an ad using XML and java

Copyright 2014 by Janson Industries 3 Ad Companies ▀ AdMob, Inmobi, Mopub, Jumptap, Tapit, Smaato, Mobfox, AdSense ▀ They provide code that you add to your app ▀ Their code figures out size of ad to display based on the device

Copyright 2014 by Janson Industries 4 Measurements ▀ CTR – click through rate u % of people who click on an ad ► If the ad is displayed 100 times and is clicked twice, the ctr is 2% or.02 ▀ CPC – cost per click u How much advertiser will pay you for each click ► 47 cents for each click through

Copyright 2014 by Janson Industries 5 Measurements ▀ eCPM – effective cost per thousand ad views (impressions) u How much you should make for a thousand ads being displayed u Need to multiply CPC (.47) by 1000 by CTR (.02) ►.47 * 1000 *.02 = $9.40 ▀ Ad companies track all these measurements (and report them to you)

Copyright 2014 by Janson Industries 6 Admob provides reports

Copyright 2014 by Janson Industries 7 Notice reported stats

Copyright 2014 by Janson Industries 8 Detailed stats

Copyright 2014 by Janson Industries 9 My sad, unpopular app

Copyright 2014 by Janson Industries 10 Measurements ▀ Most of the ad companies won’t let you post these numbers ▀ Also, if they see unusual numbers: u A CTR of 57% u Clicks are done by a small % of users or locations ► They may shut down your app People have their friends, relatives, and neighbors download app and click ads

Copyright 2014 by Janson Industries 11 Going to use AdMob (owned by Google)

Copyright 2014 by Janson Industries 12 Sign up using your google account

Copyright 2014 by Janson Industries 13 If you are at the same computer that you created the account on they will know who you are! If so, fill in the password

Copyright 2014 by Janson Industries 14

Copyright 2014 by Janson Industries 15 Specify info for an Admob account then click Continue

Copyright 2014 by Janson Industries 16 Scroll down, accept Terms, click Submit

Copyright 2014 by Janson Industries 17 Click Add Your First App

Copyright 2014 by Janson Industries 18 Specify tax and payment info, the click Submit

Copyright 2014 by Janson Industries 19 Click Sites and Apps then Android App

Copyright 2014 by Janson Industries 20 Fill in app info and click Continue

Copyright 2014 by Janson Industries 21 Go to click Monetize new app

Copyright 2014 by Janson Industries 22 Specify Project name and Android

Copyright 2014 by Janson Industries 23 Specify Ad type and give it a name

Copyright 2014 by Janson Industries 24 You can change some ad formatting

Copyright 2014 by Janson Industries 25 You need the add unit ID and you can have them info to you

Copyright 2014 by Janson Industries 26 Specify address to send to

Copyright 2014 by Janson Industries 27 The Ad unit ID that you will need to get ads

Copyright 2014 by Janson Industries 28 Go back to Home, scroll down, and the project(s) should be displayed

Copyright 2014 by Janson Industries 29 Creating From Scratch ▀ Must create a new project (AdProj) with a min target of 3.2, package (my.ad.com), activity (AdProjActivity), and layout (main) u Example will be 4.X ▀ Need to: u Add a reference to the Google play services library u Modify the Manifest

Copyright 2014 by Janson Industries 30

Copyright 2014 by Janson Industries 31 Must import google-play-services_lib into the workspace (Should already be there from MapProj but if not…) File, Import, expand the Android folder and select Existing Android Code Into WorkSpace, then click Next

Copyright 2014 by Janson Industries 32 Click the Browse button then navigate to the sdk/extras/google/google_play_services/libproject/google -play-services_lib, click OK then Finish

Copyright 2014 by Janson Industries 33 Click Android Right click AdProj and select Properties

Copyright 2014 by Janson Industries 34 Scroll down, click Add, then select the library and click OK c

Copyright 2014 by Janson Industries 35 Setup ▀ Manifest have: u The following meta tag in the application element u The following activity defined

Copyright 2014 by Janson Industries 36

Copyright 2014 by Janson Industries 37 Setup u The following permissions outside the application tags

Copyright 2014 by Janson Industries 38

Copyright 2014 by Janson Industries 39 Defining an Ad ▀ Use an AdView component ▀ Two ways to define an AdView u With xml in the layout u With java in the activity ▀ Will define an AdView component in xml

Copyright 2014 by Janson Industries <LinearLayout xmlns:android=" xmlns:ads=" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <com.google.android.gms.ads.AdView android:layout_width="wrap_content" android:layout_height="wrap_content" ads:adUnitId="ca-app-pub / " ads:adSize="BANNER"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" /> 40 Don’t forget to substitute your Ad Unit ID in the adUnitId parameter main.xml

Copyright 2014 by Janson Industries 41 AdProjActivity.java ▀ Need to import ▀ Need an AdView variable and object in onCreate then u After setContentView, create an AdRequest and add a test device u Load ad into adView import com.google.android.gms.ads.*; // Look up the AdView as a resource and load a request. AdView adView = (AdView)this.findViewById(R.id.adView); AdRequest adRequest = new AdRequest.Builder().addTestDevice(AdRequest.DEVICE_ID_EMULATOR).addTestDevice("abc").build(); adView.loadAd(adRequest);

Copyright 2014 by Janson Industries 42 AdProjActivity.java ▀ You will get a test ad u Google doesn't want you to download real ads while testing ▀ To get a real add // Look up the AdView as a resource and load a request. AdView adView = (AdView)this.findViewById(R.id.adView); AdRequest adRequest = new AdRequest.Builder() //.addTestDevice(AdRequest.DEVICE_ID_EMULATOR) //.addTestDevice("abc").build(); adView.loadAd(adRequest);

Copyright 2014 by Janson Industries 43 AdProjActivity.java ▀ Have to run to get a real TestDevice number ▀ Find in logcat

Copyright 2014 by Janson Industries 44 AdProjActivity.java ▀ Substitute for abc // Look up the AdView as a resource and load a request. AdView adView = (AdView)this.findViewById(R.id.adView); AdRequest adRequest = new AdRequest.Builder()..addTestDevice(AdRequest.DEVICE_ID_EMULATOR).addTestDevice("B3EEABB8EE11C2BE770B684D95219ECB").build(); adView.loadAd(adRequest);

Copyright 2014 by Janson Industries 45

Copyright 2014 by Janson Industries 46 ads:adSize="SMART_BANNER"

Copyright 2014 by Janson Industries 47 ads:adSize="MEDIUM_RECTANGLE"

Copyright 2014 by Janson Industries 48 Other Types of Ad n Interstitial Ads u Full screen ads with a close button u More expensive, therefore there are often display limits

Copyright 2014 by Janson Industries 49 Go back to AdMob and add an Interstatial add to the app

Copyright 2014 by Janson Industries 50 Specify timeout and ad name

Copyright 2014 by Janson Industries 51

Copyright 2014 by Janson Industries 52

Copyright 2014 by Janson Industries 53

Copyright 2014 by Janson Industries 54 Interstitial n Need class level variables n In onCreate, create an InterstitialAd object, set the Ad Unit ID, create the AdRequest and load the ad private InterstitialAd interstitial; private static final String AD_UNIT_ID = "ca-app-pub / "; interstitial = new InterstitialAd(this); interstitial.setAdUnitId(AD_UNIT_ID); // Create ad request. AdRequest adRequest = new AdRequest.Builder().build(); // Begin loading the interstitial interstitial.loadAd(adRequest);

Copyright 2014 by Janson Industries 55 Interstitial Ads n Can take a while to load n If you try to display before loaded will get an error n So we will put a button on the screen and show the ad after the button is touched

Copyright 2014 by Janson Industries <LinearLayout xmlns:android=" xmlns:ads=" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" /> <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_marginLeft="100px"> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:onClick="doClick" android:text="Show Ad" /> 56 main.xml

Copyright 2014 by Janson Industries 57 doClick in AdProjActivity n Time to test import android.view.View; : : : public void doClick(View arg0) { interstitial.show(); }

Copyright 2014 by Janson Industries 58 Check in logcat that ad has loaded

Copyright 2014 by Janson Industries 59 Click Show Ad

Copyright 2014 by Janson Industries 60 AdListeners n In java, Activity can implement the AdListener interface n Then tie the ad listener to the adView adView.setAdListener(this);

Copyright 2014 by Janson Industries 61 AdListeners n Activity can implement onAdxxx methods that are called when ad is: u Successfully and unsuccessfully received F onAdLoaded, onAdFailedToLoad u When ad is overlaid on the screen F onAdOpened u Ad dismissed and returning to app F onAdClosed u When ad clicked F onAdLeftApplication

Copyright 2014 by Janson Industries 62 AdListeners n So instead of having a button to display the ad u Create onAdLoaded method and have it display the ad n And if ad doesn't load u Create onFailedToLoad method to retry to load the ad