Anuj Dhiman
Anuj Dhiman

Reputation: 1580

How to write firebase cloud functions in java

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.

Upvotes: 15

Views: 10853

Answers (3)

Doug Stevenson
Doug Stevenson

Reputation: 317828

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.

Upvotes: 17

jthegedus
jthegedus

Reputation: 745

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.

Upvotes: 10

Nikhil
Nikhil

Reputation: 1018

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

Upvotes: 0

Related Questions