'Java Callable Cloud Functions example

I see many information on callable functions written using node.js , but none using java.

I see callable functions has many features build in, e.g.

  1. With callable functions, firebase authentication and FCM tokens are automatically included in requests when available.
  2. Request body gets deserialized automatically and tokens are validated on functions.https.onCall trigger.

Is there a way to write callable functions using Java ? if yes any example code



Solution 1:[1]

HTTPS Callable functions are a feature of Cloud Functions for Firebase, which only supports Node.js, so there isn't currently a way to write Callables using Java.

If you'd like to be able to write Callables (and other function types) in Java with Cloud Functions for Firebase, please file a feature request. For now, a workaround might be to write a simple Node.js callable function that forwards relevant information to another, non-Firebase, Cloud Function written in Java via PubSub or HTTP.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jeff