[Feature] Setup firebase cloud messaging(FCM) push notification in Android - inspireui/support GitHub Wiki
Setup FCM push notification in Android
Step 1: Open your project in https://console.firebase.google.com/
Step 2: Open your firebase project console, click the gear icon in the upper left corner and select Project setting
Step 3: Select the Android icon in the Your apps section
Step 4: Enter info your app
- Android package name is name package of android. Open file
android/app/src/main/AndroidManifest.xml
, in first line, copy package name after keywordpackage
Fill info and click Register app
(You can omit the Debug signing certificate SHA-1
parameter)
Step 5: Download file google-service.json
and move to folder <project-name>/android/app
If your folder <project-name>/android/app
already has a file google-service.json
, delete it and make sure the file name is exactly google-service.json
Click next to continue...
Step 6: This step is Add Firebase SDK, because our project has all setup already, so just click next to continue.
Step 7: At this stage, it is possible that firebase will not detect your test device, but that's okay, just click Skip step
to continue with the following steps. (In case Firebase detect can click Continue to console)
Step 8: Back to your project, run flutter clean
and then flutter run
Complete the setup process, now push notification from your firebase.