0

I am very new in both Android Development and fcm. I have been building a mobile app, and I want to use Firebase Cloud Messaging to push notifications to particular users(by making them subscribing to different topics). I've already created a Java Server (apart from the mobile app) but I could not figure out how to test it on my application because I don't know how to find fcm key for my application if there is any. Is there a way to test my server locally or is it obligated to have an application registered to Google Firebase? Any help would be appreciated, thanks in advance.

Onur Arı
  • 502
  • 3
  • 16
  • [this](https://stackoverflow.com/questions/37337512/where-can-i-find-the-api-key-for-firebase-cloud-messaging) would help you to get `fcm key` – Tupio Jul 23 '18 at 14:45

2 Answers2

0

Is there a way to test my server locally or is it obligated to have an application registered to Google Firebase?

You definitely need to register your application to firebase to use FCM and get the key.

I could not figure out how to test it on my application because I don't know how to find fcm key for my application if there is any.

After you register your app to firebase and link it to your Android studio project, (https://firebase.google.com/docs/android/setup)

Go to your project settings in firebase,

Settings

In your project settings, click on Cloud Messaging, the Server Key is your FCM KEY

Firebase Project Settings

Follow this to send message from your server to device. You can also use firebase console to do that,

How can I send a Firebase Cloud Messaging notification without use the Firebase Console?

MRah
  • 900
  • 5
  • 14
0

Yes you can.

The FCM API key (Server Key) can be found in the firebase console under your project :

Project Settings > Cloud Messaging