Skip to content

Instantly share code, notes, and snippets.

@tbatsuur
Created October 20, 2018 21:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tbatsuur/6380b5441e3d5028a1d6d7da8a4cf3df to your computer and use it in GitHub Desktop.
Save tbatsuur/6380b5441e3d5028a1d6d7da8a4cf3df to your computer and use it in GitHub Desktop.
val notificationChannel = NotificationChannel(DEFAULT_NOTIFICATION_CHANNEL, "My Default Notifications", NotificationManager.IMPORTANCE_HIGH)
// Configure the notification channel.
notificationChannel.description = "Default Channel"
notificationChannel.enableVibration(true)
notificationChannel.vibrationPattern = longArrayOf(0, 1000, 500, 1000)
notificationManager.createNotificationChannel(notificationChannel)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment