Push notification in Ionic using firebase
Push notification in Ionic using firebase, Here we are going to use Ionic 1 and Angularjs. Push notification is the main thing for mobile apps to notify our users to our latest updates. Google providing a firebase to make it simple for the developers. Push notifications useful to send messages, alerts to your app user devices even if your app is not in open state. Lets see how to make it works using ionic and angularjs.
Step 1 : Create your ionic app
Cordova create ionicPush
Step 2 : Create firebase account
Step 3 : Click Add project
Step 4 : Fill the form and click create project. It will create a project and redirect to project dashboard
Step 5 : Click ” Add Firebase to your Android app ” icon
Step 6 : It will open up “Add Firebase to your Android app “. Register your app here
Step 7 : Click Download google-services.json and download the file
Step 8 : Click “Continue” and Click “Finish”
Step 9 : Place google-services.json into your project app directory
Step 10 : Install cordova firebase plugin [https://github.com/arnesson/cordova-plugin-firebase]
cordova plugin add email@example.com --save
Step 11 : Run your Ionic app in Emulator
cordova run android
Step 12 : Send Notification Message from Firebase Dashboard.
Step 12.1 => Click “Notifications” from Left side bar
Step 12.2 => Click “Send Your First Message” button
Step 12.3 => Enter your messages and choose your app.
Step 12.4 => Click send message button. It will open up with preview pop up. Click send.
Thats it, It will push the given notifications to your app devices.
Hope it will help some one!.