Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 521
Anuj Dhiman Avatar asked Nov 30 '17 12:11

Anuj Dhiman


2 Answers

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.

like image 162
Doug Stevenson Avatar answered Oct 21 '22 02:10

Doug Stevenson


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.

  • Java Runtime Alpha Sign-up (available on Cloud Functions
  • Google Next 19 announcement video
like image 34
jthegedus Avatar answered Oct 21 '22 02:10

jthegedus