Skip to end of metadata
Go to start of metadata

Advertising SDK Integration Guide (Android)

Version 2.4.3

This is Phunware's Android SDK for the MaaS Advertising module. Visit the Phunware Ads portal for more details and to sign up.

 

 

Requirements

 

  • MaaS Core v3.0.3 or greater
  • Use Google Play services to enable Advertising ID support (recommended); installation instructions here

 

 

Getting Started

  • Download MaaS Advertising and run the included sample app.
  • Continue reading below for installation and integration instructions.

 

Installation

Usage of Maas Advertising requires the following changes to the build.gradle and AndroidManifest.xml 

 

Libraries

To use Advertising SDK add the following dependency to your build.gradle

compile ('com.phunware.advertising:ads:2.4.3:release@aar'){
      transitive = true;
}

Update your AndroidManifest.xml to include these permissions and activity.

 

 

Integration

The primary methods in MaaS Advertising involve displaying the various ad types.

 

Native Ad Usage

Native ads are advertisements designed to fit naturally into your app's look and feel. Predefined ad features are provided as a JSON payload which your app consumes in a template that follows your UI's theme.

 

 

Multiple Ads Request

 

 

Banner Usage

Banners are inline ads that are shown alongside your app's interface.

For XML usage only. 

 

Add this to your layout xml.

OR

If Zone is not specified, add this to your layout .xml

 

Add this to your activity:

 

 

Interstitial Usage

Interstitial ads are best used at discrete stopping points in your app's flow, such as at the end of a game level or when the player dies.

 

 

 

Video Ads Usage

Video ads are interstitial ads that play a video. They are best used at discrete stopping points in your app's flow, such as at the end of a game level or when the player dies.

 

Rewarded Video Ads Usage

Rewarded Video ads are interstitial ads that play a video and reward the user after see the video. They are best used on games making the user wants to see an Ad to be rewarded.

 

 

  • No labels