Ionic app with push service android


#1

i did according to this steps

but

Step 2: Hooking up ionic.io
In the .config of your project’s www/js/app.js file, add a gcm_id field with your app’s
GCM sender ID as shown below.

.config(['$ionicAppProvider', function($ionicAppProvider) {
  // Identify app
  $ionicAppProvider.identify({
    // The App ID for the server
    app_id: 'YOUR_APP_ID',
    // The API key all services will use for this app
    api_key: 'YOUR_PUBLIC_API_KEY',
    // The GCM project number
    gcm_id: 'YOUR_GCM_ID'
  });
}])

what is the app_id and API key?
google app id and google API key or IONIC app id and IONIC api key?


#2
  1. app_id is the ionic identifier for your app.
  2. api_key is the ionic api key
  3. gcm_id is the identifier for you project on google.

#3

thank you for the reply.
i tried like that.but i got this


#4

Missing plugins ?

ionic plugin add https://github.com/phonegap-build/PushPlugin.git
ionic add ngCordova
ionic add ionic-service-core
ionic add ionic-service-push

#5

i did these steps.problem is after add “gcm_id”


#6

i tested in android.its working.i think its only error when use the browser.


#7

It will error in browser as the plugins are not available unless you are on a device, make sure you wrap all plugin calls around $ionicPlatform.ready this will help reduce the errors you receive whilst in development on the browser.


#8

thank you for the idea.