Esempio n. 1
0
 public void OnRequestNotificationPermissionButtonClicked()
 {
     NotificationsKit.RequestPermission(
         new KeyValueList(2)
         .Add("tag-a", "value-a")
         .Add("tag-b", "value-b")
         ,
         (result, granted) =>
     {
         if (result == Trail.Result.Ok)
         {
             if (granted)
             {
                 Debug.Log("Notifications granted");
             }
             else
             {
                 Debug.Log("Notifications not granted");
             }
         }
         else
         {
             Debug.LogWarningFormat("Request permission failed: {0}", result.ToString());
         }
     }
         );
 }
Esempio n. 2
0
 public void OnGetNotificationPermissionStatusButtonClicked()
 {
     NotificationsKit.GetPermissionStatus((result, granted) =>
     {
         if (result == Trail.Result.Ok)
         {
             if (granted)
             {
                 Debug.Log("Notifications granted");
             }
             else
             {
                 Debug.Log("Notifications not granted");
             }
         }
         else
         {
             Debug.LogWarningFormat("Request permission failed: {0}", result.ToString());
         }
     });
 }