Xtra Coder
Xtra Coder

Reputation: 3497

How to subscribe and receive Firebase message in pure Java (not Android)

I'm looking for the way I can create a receiver of Firebase Cloud Messages in Java. Things successfully work in Android, but I could not find anything to start in Java.

Official documentation does not mention Java as supported language, but I also did not find explicit statement that Java is not supported.

Here is the documentation entry points for Android, c++ and WEB (Browser). Where can I find something similar for Java?

Upvotes: 0

Views: 237

Answers (2)

apramc
apramc

Reputation: 1386

check out firebase_admin messaging module, I am able to successfully send messages to my android phone from my python server at home. I know it also allows you to subscribe to different messages. It supports Java but not aware of the technical differences

Upvotes: 0

Frank van Puffelen
Frank van Puffelen

Reputation: 598765

Firebase Cloud Messaging does not support receiving messages on Java desktop apps.

The protocol was made for delivering messages to mobile (Android and iOS) devices, and then expanded for web clients. It seems unlikely this will be expanded to desktop or server apps in the (near) future, although I'd definitely recommend filing a feature request.

In the meantime, consider using another push technology, such as the Firebase Realtime Database or Cloud Firestore.

Upvotes: 1

Related Questions