Exemplo n.º 1
0
        public void Dispose()
        {
            if (_renewTokenTimer != null)
            {
                _renewTokenTimer.Dispose();
            }

            _firebaseApp.Delete();
        }
Exemplo n.º 2
0
        public async Task <IActionResult> TriggerMessage([FromBody] TriggerMessageRequest request)
        {
            //var clientTokens = new List<string>();
            var registrationTokens = request.UserIds.ToList();

            var message = new MulticastMessage()
            {
                Tokens       = registrationTokens,
                Notification = new Notification()
                {
                    Title = request.Title,
                    Body  = request.Message
                }
            };
            var result = await messaging.SendMulticastAsync(message);

            //var response = FirebaseMessaging.GetMessaging(FirebaseApp.GetInstance("salesforce247app")).SendMulticastAsync(message).ConfigureAwait(true);
            app.Delete();
            return(Ok(true));
        }
Exemplo n.º 3
0
 public void Dispose()
 {
     app.Delete();
 }