Skip to content

Commit

Permalink
added ads
Browse files Browse the repository at this point in the history
  • Loading branch information
Mcdonald committed Dec 8, 2016
1 parent fee996a commit b08621d
Show file tree
Hide file tree
Showing 25 changed files with 12,054 additions and 7,591 deletions.
1 change: 1 addition & 0 deletions config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
<plugin name="cordova-plugin-email-composer" spec="~0.8.3" />
<plugin name="cordova-plugin-apprate" spec="~1.2" />
<plugin name="cordova-plugin-admobpro" spec="~2.24.0" />
<plugin name="com.phonegap.plugins.PushPlugin" spec="https://github.com/phonegap-build/PushPlugin.git" />
<plugin name="cordova-plugin-inappbrowser" spec="~1.5.0" />
<plugin name="cordova-plugin-statusbar" spec="https://github.com/apache/cordova-plugin-statusbar.git" />
</widget>
9 changes: 9 additions & 0 deletions plugins/fetch.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,5 +128,14 @@
},
"is_top_level": false,
"variables": {}
},
"com.phonegap.plugins.PushPlugin": {
"source": {
"type": "git",
"url": "https://github.com/phonegap-build/PushPlugin.git",
"subdir": "."
},
"is_top_level": true,
"variables": {}
}
}
44 changes: 36 additions & 8 deletions www/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,26 @@ angular.module('underscore', [])
// the 2nd parameter is an array of 'requires'
angular.module('your_app_name', [
'ionic',
'ngCordova',
'your_app_name.directives',
'your_app_name.controllers',
'your_app_name.services',
'your_app_name.config',
'your_app_name.factories',
'your_app_name.filters',
'ngMap',
'admob',
'angularMoment',
'underscore',
'ngCordova',
'youtube-embed'
])

.run(function($ionicPlatform, AuthService, $rootScope, $state, PushNotificationsService) {
.run(function($ionicPlatform, $adMob, AuthService, $rootScope, $state, PushNotificationsService) {

$ionicPlatform.on("deviceready", function(){
$ionicPlatform.on("deviceready", function(){
$state.go('app.home');
// Hide the accessory bar by default (remove this to show the accessory bar above the
keyboard
// keyboard
// for form inputs)
if (window.cordova && window.cordova.plugins.Keyboard) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
Expand All @@ -37,9 +38,37 @@ angular.module('your_app_name', [
// org.apache.cordova.statusbar required
StatusBar.styleDefault();
}





if(window.AdMob) {
var admobid;

if (device.platform == "Android") {
admobid = { // for Android
banner: 'ca-app-pub-4644220547347064/5643587431',
interstitial: 'ca-app-pub-4644220547347064/8597053830'
};
} else {
admobid = { // for iOS
banner: 'ca-app-pub-your-ad-key',
interstitial: 'ca-app-pub-your-ad-key'
};
}

$adMob.createBanner( {
adId: admobid.banner,
autoShow: true,
bgColor: 'black',
position: $adMob.position.BOTTOM_CENTER
});

$adMob.prepareInterstitial({
adId: admobid.interstitial,
autoShow: false
});
};


PushNotificationsService.register();
});

Expand All @@ -49,7 +78,6 @@ angular.module('your_app_name', [
});



// UI Router Authentication Check
$rootScope.$on("$stateChangeStart", function(event, toState, toParams, fromState, fromParams){

Expand Down
13 changes: 7 additions & 6 deletions www/lib/angular/.bower.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
{
"name": "angular",
"version": "1.3.13",
"version": "1.5.3",
"license": "MIT",
"main": "./angular.js",
"ignore": [],
"dependencies": {},
"homepage": "https://github.com/angular/bower-angular",
"_release": "1.3.13",
"_release": "1.5.3",
"_resolution": {
"type": "version",
"tag": "v1.3.13",
"commit": "ad68cfecb69ff7cacb27813377ce9d95e072529b"
"tag": "v1.5.3",
"commit": "5a07c5107b4d24f41744a02b07717d55bad88e70"
},
"_source": "git://github.com/angular/bower-angular.git",
"_target": "1.3.13",
"_source": "https://github.com/angular/bower-angular.git",
"_target": "1.5.3",
"_originalSource": "angular"
}
7 changes: 2 additions & 5 deletions www/lib/angular/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ Then add a `<script>` to your `index.html`:
<script src="/node_modules/angular/angular.js"></script>
```

Note that this package is not in CommonJS format, so doing `require('angular')` will return `undefined`.
If you're using [Browserify](https://github.com/substack/node-browserify), you can use
[exposify](https://github.com/thlorenz/exposify) to have `require('angular')` return the `angular`
global.
Or `require('angular')` from your code.

### bower

Expand All @@ -46,7 +43,7 @@ Documentation is available on the

The MIT License

Copyright (c) 2010-2012 Google, Inc. http://angularjs.org
Copyright (c) 2010-2015 Google, Inc. http://angularjs.org

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
8 changes: 8 additions & 0 deletions www/lib/angular/angular-csp.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,11 @@
ng\:form {
display: block;
}

.ng-animate-shim {
visibility:hidden;
}

.ng-anchor {
position:absolute;
}
Loading

0 comments on commit b08621d

Please sign in to comment.