Beispiel #1
0
        public async Task SubscribeAsync(DeviceInstallationDto installationRequest, string user)
        {
            var userId = "ANY";

            var installation = new Installation
            {
                InstallationId = installationRequest.Id,
                UserId         = user,
                PushChannel    = installationRequest.PnsHandle,
                Tags           = new[] { $"user:{userId}" },
                Platform       = NotificationPlatform.Fcm,
            };

            // call notification hubs to create a new registration ID, and then return the ID back to the device.
            await hub.CreateOrUpdateInstallationAsync(installation);
        }
Beispiel #2
0
 public async Task UpdateInstallationAsync(DeviceInstallationDto installationRequest)
 {
     await pushNotifyer.SubscribeAsync(installationRequest, "dominik");
 }