简体   繁体   中英

How to push notification to specific users in Xamarin.Forms Android?

我已经实现了使用xamarin.forms Android的推送通知这个 ,但它发送通知到所有device.I要发送通知给特定的用户我only.How能实现吗?

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

    ...

}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM