0

I want to use Firesharp in a desktop application for Windows. The application will only receive notifications from Firebase, and there will be no database interactions of any kind (Firebase Cloud Messaging / FCM is the only thing used from Firebase), nor will there be a web / Firebase database. The Windows application will be subscribed to a specific topic in the project, and will constantly monitor it for new messages.

My problem is that I'm unsure how to create the config object shown in the official Firesharp example, since it's about connecting to the web database (which I don't need):

IFirebaseConfig config = new FirebaseConfig
{
   AuthSecret = "your_firebase_secret",
   BasePath = "https://yourfirebase.firebaseio.com/"
};

IFirebaseClient  client = new FirebaseClient(config);

Assuming that I initially want to hardcode my credentials, how can I create the config / connection object for sending push notifications to a specific topic?

I'm guessing that I need the server key and some sort of a FCM URL with the topic included, but I have no idea how to go about this.

I've downloaded the complete GitHub project, and looked through the files (string search for fcm, push, notification, googleapis, path), and the only thing I've found is the use of <appname>.firebaseio.com.

FiddlingAway
  • 1,598
  • 3
  • 14
  • 30
  • 1
    "The application will only receive notifications from Firebase" -> Receiving FCM messages is only possible on Android and iOS devices. There is no support for *receiving* messages on Windows. – Frank van Puffelen Apr 16 '20 at 13:39

1 Answers1

2

The FireSharp library that you use only wraps the Firebase Realtime Database API as far as I see. It doesn't wrap any other Firebase services, such as Firebase Cloud Messaging.

In addition: receiving FCM messages is only possible on Android and iOS devices. There is no support for receiving messages on Windows. See Using Firebase Cloud Messaging with Windows Application

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
  • "No support" as in not possible to do at all? – FiddlingAway Apr 17 '20 at 14:34
  • Many things are *possible*. But there's no SDK, nor any other project, for receiving Firebase Cloud Messaging on Windows. See https://stackoverflow.com/questions/43513627/using-firebase-cloud-messaging-with-windows-application – Frank van Puffelen Apr 17 '20 at 15:13