Using Firesharp for Windows desktop push notifications only

假如想象 提交于 2020-04-18 01:05:19

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/61248834/using-firesharp-for-windows-desktop-push-notifications-only

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!