Created
July 2, 2015 19:21
-
-
Save jbasinger/483304bd342fa07f6b43 to your computer and use it in GitHub Desktop.
Ionic Push Notification Post Gists
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ionic plugin add https://github.com/phonegap-build/PushPlugin.git | |
| ionic add ngCordova | |
| ionic add ionic-service-core | |
| ionic add ionic-service-push |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| angular.module('yourTotallyAwesomeApp') | |
| .config(['$ionicAppProvider', function($ionicAppProvider) { | |
| $ionicAppProvider.identify({ | |
| app_id: 'ionic_app_ID', | |
| api_key: 'ionic_public_key', | |
| gcm_id: 'google_project_number' | |
| }); | |
| }]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "tokens":[ | |
| "b284a6f7545368d2d3f753263e3e2f2b7795be5263ed7c95017f628730edeaad", | |
| "d609f7cba82fdd0a568d5ada649cddc5ebb65f08e7fc72599d8d47390bfc0f20" | |
| ], | |
| "notification":{ | |
| "alert":"Hello World!", | |
| "android":{ | |
| "collapseKey":"foo", | |
| "delayWhileIdle":true, | |
| "timeToLive":300, | |
| "payload":{ | |
| "$state": "a_ui-router_state", | |
| "key1":"value", | |
| "key2":"value" | |
| } | |
| } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| angular.module('yourTotallyAwesomeApp', [ | |
| 'ionic', | |
| 'ngCordova', | |
| 'ionic.service.core', | |
| 'ionic.service.push' | |
| ]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment