如何在Xamarin.Forms Android中将通知推送给特定用户? [英] How to push notification to specific users in Xamarin.Forms Android?
本文介绍了如何在Xamarin.Forms Android中将通知推送给特定用户?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
I have Implemented push notification in xamarin.forms android using this but it sends the notification to all the device.I want to send notification to the specific users only.How can I achieve it ?
推荐答案
为此我们使用了标记.每个用户都有一个用户ID,因此当设备以天蓝色注册时,您可以将其用户ID作为标签添加到注册中.
We use tags for this. Each user has a user Id and so when the device registers with azure, you add their user Id as a tag to the registration.
protected override void OnRegistered(Context context, string registrationId) {
...
var tags = new List<string>() { "userId4" }; // Your UserId here
...
}
这篇关于如何在Xamarin.Forms Android中将通知推送给特定用户?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文