Need help on implementing ionic push notification android


#1

I am following the documentation on how to implement ionic push here http://docs.ionic.io/v2.0.0-beta/docs/push-full-setup

I do what the documentation say. But when I run the app in the browser ionic serve i am getting this error

iam using ionic 1.3.1

here is my code

var app = angular.module('app', ['ionic','ionic.service.core',  'ngCordova',  'ionic.service.push', 'app.routes', 'app.services', 'app.directives', 'angularMoment'])


.run(function($ionicPlatform) {
    $ionicPlatform.ready(function() {
      
        // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
        // for form inputs)
        if (window.cordova && window.cordova.plugins && window.cordova.plugins.Keyboard) {
            cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
            cordova.plugins.Keyboard.disableScroll(true);
        }
        if (window.StatusBar) {
            // org.apache.cordova.statusbar required
            StatusBar.styleDefault();
        }

        var push = new Ionic.Push({
          "debug": true
        });

        push.register(function(token) {
          console.log("Device token:",token.token);
        });

    });
})

im not really sure what to do to make it work. I already setup google developers console account and also set it up with ionic. I follow this documentation carefully http://docs.ionic.io/v1.0/docs/push-android-setup

hoping someone can help. thanks in advance