13
votes

I am new in firebase . I am store data in firebase database using admin sdk(java code ). I have done this part successfully . Now i want write fire base cloud function on create of database entry and notification as

1. The function triggers on writes to the Realtime Database path where followers are stored.
2. The function composes a message to send via FCM.
3. FCM sends the notification message to the user's device.

As i have search more on internet , found only node.js code for that.

https://firebase.google.com/docs/functions/get-started

Is it possible to write firebase cloud function using admin sdk or java code.Please help me.

3
I think Firebase cloud functions only allow for JavaScript. They are running on a node.js server so I don't think you can use Java.DoesData

3 Answers

14
votes

EDIT: May 30, 2020

There is now support for Java/JVM in Cloud Functions. Please see the release blog and documentation for information.

Original answer

For Cloud Functions, there is currently no support for Java or any other languages or environments other than JavaScript in a node.js environment.

9
votes

GCP Cloud Functions now has a Java Runtime.

At this time it is currently in alpha, but I would expect it to release to Beta rather quickly.

0
votes

There is no support for Java currently for cloud functions in Firebase. You can use JavaScript or TypeScript for this.

Firebase Cloud Functions using TypeScript