private static async System.Threading.Tasks.Task RegisterForPush(bool registerAgain = true)
{
PushNotificationHelper.RegisterPushNotificationChannel();
var helper = new TaskHelper();
var pushNotificationTask = await helper.RegisterTask(nameof(PushNotificationTask),
typeof(PushNotificationTask).FullName,
new PushNotificationTrigger(),
registerAgain);
if (pushNotificationTask == null)
{
Debug.WriteLine("Push notification background task is not started");
}
}