Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hardik8184/firebasepushnotification
Send push notification from server to mobile application.
https://github.com/hardik8184/firebasepushnotification
android android-application android-library firebase-cloud-messaging firebase-console firebase-messaging library notification-android notification-api notifications
Last synced: 11 days ago
JSON representation
Send push notification from server to mobile application.
- Host: GitHub
- URL: https://github.com/hardik8184/firebasepushnotification
- Owner: Hardik8184
- Created: 2019-09-24T09:11:30.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-09-24T09:12:05.000Z (over 5 years ago)
- Last Synced: 2023-03-19T13:41:39.191Z (almost 2 years ago)
- Topics: android, android-application, android-library, firebase-cloud-messaging, firebase-console, firebase-messaging, library, notification-android, notification-api, notifications
- Language: Kotlin
- Homepage:
- Size: 1.21 MB
- Stars: 13
- Watchers: 1
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Firebase Push Notification Tutorial
How Firebase Push Notification works?
Firebase serves as a module between your server and the devices that will be receiving the push notifications that you create. Your server informs Firebase that a notification has to be sent. Then Firebase does the work behind the scenes to get the notification published.
How to integrate FCM into Android Project?
Step for creating Firebase Project
Step 1: Open Firebase console
Step 2: Click on Add project and give name to your project and select country. If you have already created a project skip this step.
Step 3: Then select “Add Firebase to your Android app”.
Step 4: Add project package id or application id and genrate SHA-1 signatature of your machine.
Step 5: Download google-service.json and put into app module.
How to generate SHA Key using Android Studio:
- Open your project into Android studio.
- Click on Gradle tab on right side.
- Collapse :app module -> Tasks -> Android -> signing report.
- SHA-1 will generate. Copy and paste into SHA-1 in firebase console.
How to integrate Firebase SDK into Android Project?
Step 1:
Add below code into <project>/build.gradle file.
buildscript {
dependencies {
// Add this line
classpath 'com.google.gms:google-services:4.3.2'
}
}Step 2:
Add below code into <project> / <app>/build.gradle.
dependencies {
// Add this line
implementation 'com.google.firebase:firebase-messaging:20.0.0'
}
...
// Add to the bottom of the file
apply plugin: 'com.google.gms.google-services'Step 3:
Press on sync now in the Android Studio.
Now you can send Push Notification using Firebase Console
1. Go to firebase console and select the app you created.
2. From the left menu select notification.
3. Click on new message.
4. Enter message, select single device and paste the token you copied and click on send. The same as I did on the video, and check your device
So that's all for this Firebase Cloud Messaging Tutorial. If any query/suggestion for Firebase Cloud Messaging Tutorial ask freely on
[email protected]Thanks.