CrossGeeks / AzurePushNotificationPlugin

Azure Push Notification Plugin for Xamarin iOS and Android
MIT License
67 stars 34 forks source link

Not filtering via tags - Android #52

Closed curelom closed 4 years ago

curelom commented 4 years ago

I register my app when the user signs on with tag for the userId.

await CrossAzurePushNotification.Current.RegisterAsync(new string[] { UserContext.UserIdentifier });

I setup a few channels

notificationManager.CreateNotificationChannel(new NotificationChannel( NotificationConstants.NOTIFICATION_MAILERS_CHANNEL_ID, "Mailers", NotificationImportance.High)); ...

I send with the tag of the userId and have the channel id in the jsonString, among others var results = await hub.SendFcmNativeNotificationAsync(jsonString, tag);

The problem I have is that it sends the message to everybody, not just the one user. How do I filter so just the one user gets the message

curelom commented 4 years ago

My problem. Found I was calling without the tag later in code.