ChatterBox.Client.Common.Notifications.PushNotificationHelper.RegisterPushNotificationChannel C# (CSharp) Method

RegisterPushNotificationChannel() public static method

public static RegisterPushNotificationChannel ( ) : void
return void
        public static async void RegisterPushNotificationChannel()
        {
            bool registered = false;
            try
            {
                var channel = await PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync();
                if (channel != null)
                {
                    registered = true;
                    RegistrationSettings.PushNotificationChannelURI = channel.Uri;
                    Debug.WriteLine($"Push token chanell URI: {channel.Uri}");
                }
            }
            catch (Exception e)
            {
                Debug.WriteLine($"Exception during push token chanell URI reistration: {e.Message}");
            }

            if (!registered)
                Debug.WriteLine($"Push token chanell URI is NOT obtained");

        }
    }
PushNotificationHelper