如何向 Xamarin Android 应用程序发送推送通知?
How to Send Push Notification to Xamarin Android app?
我需要使用 Xamarin
向我们的 Android App
实施推送通知。这是过程。我们有经理使用的网络版本。经理创建工作并将其分配给 driver。应用程序版本由 Driver 使用,它显示作业列表和作业进程,直到完成。所以,当Manager将Job分配给Web版的Driver时,会通知App版的Driver"new job is assigned"。基本上,网络和应用程序都使用相同的数据库,然后我们创建了一个 api(REST API in MVC C#
) 来连接并从数据库获取数据以用于移动应用程序。
有人可以向我推荐我应该使用哪个推送通知插件(插件或 nuget)来执行此操作吗?目前,我已经通过 App center & Firebase
设置了推送通知,但不确定它是如何工作的。
谢谢。
I need to implement push notification to our Android App using Xamarin.
- 我建议您使用 Firebase for mobile push notifications for Android as it is a product by Google, and was made for mobile applications. For push notifications, you will be using Firebase Cloud Messaging 也称为 FCM。在开始编写任何代码之前,请确保您精通它的工作原理阅读文档,它本身就可以回答您的大部分问题。
The Manager creates and assign job to the driver. The App version is used by the Driver where it shows the list of jobs and processes of a job until its complete. So, when the Manager assigned the Job to the Driver in the Web version, it will then notified to the Driver in the App version that "new job is assigned". Basically, both the web and app use the same database then we created an API(REST API in MVC C#) to connect and get data from the DB to be used in the mobile app.
- 为此,您必须检查如何使用 Firebase using Rest-API。一旦您配置了 Rest-API,然后将您的业务逻辑应用于它,事情就会比您想象的容易得多。
Can someone recommend to me which Push notification plugin(a plugin or NuGet) should I use to do this?
- 我的建议很简单,不要使用任何类型的 firebase 推送通知插件!。我在插件方面有过一段非常糟糕的过去,从那以后我从不推荐其他开发人员使用插件,除非它是一个维护良好的插件。我宁愿要求您根据在线提供的指南简单地配置 Firebase。喜欢下面的Xamarin.Android guide for FCM。它详细包含您正在寻找的所有内容,我还建议您在 SO 上检查与 firebase 相关的答案,您会发现几乎所有文档中不可用的内容都在此处详细介绍。像下面这样:
我需要使用 Xamarin
向我们的 Android App
实施推送通知。这是过程。我们有经理使用的网络版本。经理创建工作并将其分配给 driver。应用程序版本由 Driver 使用,它显示作业列表和作业进程,直到完成。所以,当Manager将Job分配给Web版的Driver时,会通知App版的Driver"new job is assigned"。基本上,网络和应用程序都使用相同的数据库,然后我们创建了一个 api(REST API in MVC C#
) 来连接并从数据库获取数据以用于移动应用程序。
有人可以向我推荐我应该使用哪个推送通知插件(插件或 nuget)来执行此操作吗?目前,我已经通过 App center & Firebase
设置了推送通知,但不确定它是如何工作的。
谢谢。
I need to implement push notification to our Android App using Xamarin.
- 我建议您使用 Firebase for mobile push notifications for Android as it is a product by Google, and was made for mobile applications. For push notifications, you will be using Firebase Cloud Messaging 也称为 FCM。在开始编写任何代码之前,请确保您精通它的工作原理阅读文档,它本身就可以回答您的大部分问题。
The Manager creates and assign job to the driver. The App version is used by the Driver where it shows the list of jobs and processes of a job until its complete. So, when the Manager assigned the Job to the Driver in the Web version, it will then notified to the Driver in the App version that "new job is assigned". Basically, both the web and app use the same database then we created an API(REST API in MVC C#) to connect and get data from the DB to be used in the mobile app.
- 为此,您必须检查如何使用 Firebase using Rest-API。一旦您配置了 Rest-API,然后将您的业务逻辑应用于它,事情就会比您想象的容易得多。
Can someone recommend to me which Push notification plugin(a plugin or NuGet) should I use to do this?
- 我的建议很简单,不要使用任何类型的 firebase 推送通知插件!。我在插件方面有过一段非常糟糕的过去,从那以后我从不推荐其他开发人员使用插件,除非它是一个维护良好的插件。我宁愿要求您根据在线提供的指南简单地配置 Firebase。喜欢下面的Xamarin.Android guide for FCM。它详细包含您正在寻找的所有内容,我还建议您在 SO 上检查与 firebase 相关的答案,您会发现几乎所有文档中不可用的内容都在此处详细介绍。像下面这样: