예제 #1
0
 public static void RemoveNotificationChannel(string channelId)
 {
     if (PusheAndroidUtils.SdkLevel() >= 26)
     {
         PusheAndroidUtils.PusheNotificationService().Call("removeNotificationChannel", channelId);
     }
     else
     {
         Debug.Log("Lower than android 8.0. No channel to remove :|");
     }
 }
예제 #2
0
 /// <summary>
 /// For API 26 and above you can create channel for your app.
 /// Please refer to android official docs for more information
 ///
 /// NOTE: If lower than 26, nothing will happen.
 /// </summary>
 public static void CreateNotificationChannel(
     string channelId,
     string channelName,
     string description      = "",
     int importance          = 4,
     bool enableLight        = true,
     bool enableVibration    = true,
     long[] vibrationLengths = null,
     bool showBadge          = true,
     int ledColor            = 0
     )
 {
     if (PusheAndroidUtils.SdkLevel() >= 26)
     {
         PusheAndroidUtils.PusheNotificationService().Call("createNotificationChannel", channelId, channelName,
                                                           description, importance, enableLight, enableVibration, showBadge, ledColor, vibrationLengths);
     }
     else
     {
         Debug.Log("Lower than android 8.0. Channel not created!");
     }
 }