0.8 Android O support (#1441)
* Support for android version >= O
added option to provide params to create notification channel which is necessary on android version >= O
* Creating notification channel for build>=android O
if device build>=android O, creating a notification channel before notificationManager.build() is called
* using notification builder's new constructor
`NotificationCompat.Builder (Context context)` was deprecated in API 26.1.0
Using new `NotificationCompat.Builder(Context, String)` instead.
The second parameter here is notification channel id on which notifiction will be posted.
* Update Notification.java
* For API 26+ : added channel params in options
Added channelParams object inside default options to support passing parameters for notification channel
e.g. a notification object can be made like this:
`notif = { channelParams : { channelID : "channel_id", channelName : "channel_name", description : "channel_description", importance : "notification_importance"}, text: "notif_message", title: "notif_title", sound: "sound_uri"}`
Channels are a way of categorizing your notifications and is necessary to implement on android version >= Android O in order to use notifications. For more info on NotificationChannels you can visit: https://developer.android.com/reference/android/app/NotificationChannel.html
* Moved channelParams to platform specific options
Showing
Please
register
or
sign in
to comment