Skip to content

Commit

Permalink
added default channel parameter when constructing own notification (f…
Browse files Browse the repository at this point in the history
  • Loading branch information
maxost authored and kroikie committed Sep 8, 2017
1 parent 08d6c2a commit 31f4b1a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,10 @@ private void sendNotification(String messageBody) {
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0 /* Request code */, intent,
PendingIntent.FLAG_ONE_SHOT);

String channelId = getString(R.string.default_notification_channel_id);
Uri defaultSoundUri= RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this)
NotificationCompat.Builder notificationBuilder =
new NotificationCompat.Builder(this, channelId)
.setSmallIcon(R.drawable.ic_stat_ic_notification)
.setContentTitle("FCM Message")
.setContentText(messageBody)
Expand Down

0 comments on commit 31f4b1a

Please sign in to comment.