The application will be used to demonstrate both banner and interstitial (full-page) ads in a simple cross-device project using the Ionic Framework. Suggestions and Pull Requests are welcome.
- Register with Google AdMob and create at least one of each type of ad.
- Record your Ad unit ID for each.
- Clone this repository.
npm install && bower installto get all necessary depenencies.
- Restore the plugins with
ionic state restore.
- Add a platform.
ionic platform add iosor
ionic platform add android.
- Edit www/js/app.js (lines 18-19) with your Ad Unit IDs.
- Save all
- Run the project on your device or emulator
ionic run iosor
ionic run android
To build and run this demo, you must already have installed:
- Ionic Framework 1.0rc+
- Cordova 3.7+
- At least one platform (iOS or Android):
- Android SDK or
- Xcode 6.x
When complete the application should meet the following goals and objectives:
- Run on Android and iPhone.
- Display banner ads from Google AdMob.
- Display interstitial (full-page) ads from Google AdMob.
- Make use of the ngCordova plugins.
This app was put together in an afternoon, with little to no regard to good project structure. Some of the enhancements I would like to see are:
- Pull the Ad unit ID values from a configuration file.
- Automatically support ads for iOS and Android. Right now it only supports a single platform, whichever your Ad unit ID targets.
- Conform to John Papa's Angular Style Guide.