[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/

image

Step 2: Open your firebase project console, click the gear icon in the upper left corner and select Project setting

image

Step 3: Select the Android icon in the Your apps section

image

Step 4: Enter info your app

image

  • Android package name is name package of android. Open file android/app/src/main/AndroidManifest.xml, in first line, copy package name after keyword package

image

Fill info and click Register app (You can omit the Debug signing certificate SHA-1 parameter)

image

Step 5: Download file google-service.json and move to folder <project-name>/android/app

image

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.

image

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)

image

Step 8: Back to your project, run flutter clean and then flutter run

Complete the setup process, now push notification from your firebase.

image