InterviewSolution
| 1. |
Tell me some advantage of LiveData. |
|
Answer» NOTIFICATION Channels. Notification Channels allow us to separate notifications into different groups/categories. BASICALLY, Notification Channel is DESIGNED for USER. They can get full control of what they want to be notified about. If they don’t want any notification they can specifically turn off notifications for a certain channel. They can also specify importance as well as the preferred sound for a particular category of notifications and determine whether or not to OVERRIDE Do not disturb The NotificationChannel constructor requires us to specify the channel_id and channel_name strings. The Importance argument is an int which specifies the level of interruption by the notification. val MessagesChannel = NotificationChannel( MESSAGES_CHANNEL_ID, context.getString(R.string_channel_name), NotificationManager.IMPORTANCE_DEFAULT) notificationManager.createNotificationChannel(privateMessagesChannel) |
|