3131import java .util .Map ;
3232
3333/**
34- * LeanplumNotificationHelper class.
34+ * LeanplumNotificationHelper helper class for push notifications .
3535 *
3636 * @author Anna Orlova
3737 */
3838class LeanplumNotificationHelper {
39-
39+ /**
40+ * If notification channels are supported this method will try to create
41+ * NotificationCompat.Builder with default notification channel if default channel id is provided.
42+ * If notification channels not supported this method will return NotificationCompat.Builder for
43+ * context.
44+ *
45+ * @param context The application context.
46+ * @param isNotificationChannelSupported True if notification channels are supported.
47+ * @return NotificationCompat.Builder for provided context or null.
48+ */
4049 // NotificationCompat.Builder(Context context) constructor was deprecated in API level 26.
4150 @ SuppressWarnings ("deprecation" )
4251 static NotificationCompat .Builder getDefaultNotificationBuilder (Context context ,
@@ -53,6 +62,17 @@ static NotificationCompat.Builder getDefaultNotificationBuilder(Context context,
5362 }
5463 }
5564
65+ /**
66+ * If notification channels are supported this method will try to create a channel with
67+ * information from the message if it doesn't exist and return NotificationCompat.Builder for this
68+ * channel. In the case where no channel information inside the message, we will try to get a
69+ * channel with default channel id. If notification channels not supported this method will return
70+ * NotificationCompat.Builder for context.
71+ *
72+ * @param context The application context.
73+ * @param message Push notification Bundle.
74+ * @return NotificationCompat.Builder or null.
75+ */
5676 // NotificationCompat.Builder(Context context) constructor was deprecated in API level 26.
5777 @ SuppressWarnings ("deprecation" )
5878 static NotificationCompat .Builder getNotificationBuilder (Context context , Bundle message ) {
0 commit comments