Commit 0045d20d by bachinger Committed by Oliver Woodman

Document how to set the priority on API level above 25

Issue: #7820
PiperOrigin-RevId: 328917063
parent 8a8a1517
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
package com.google.android.exoplayer2.ui; package com.google.android.exoplayer2.ui;
import android.app.Notification; import android.app.Notification;
import android.app.NotificationChannel;
import android.app.PendingIntent; import android.app.PendingIntent;
import android.content.BroadcastReceiver; import android.content.BroadcastReceiver;
import android.content.Context; import android.content.Context;
...@@ -877,6 +878,10 @@ public class PlayerNotificationManager { ...@@ -877,6 +878,10 @@ public class PlayerNotificationManager {
* *
* <p>See {@link NotificationCompat.Builder#setPriority(int)}. * <p>See {@link NotificationCompat.Builder#setPriority(int)}.
* *
* <p>To set the priority for API levels above 25, you can create your own {@link
* NotificationChannel} with a given importance level and pass the id of the channel to the {@link
* #PlayerNotificationManager(Context, String, int, MediaDescriptionAdapter) constructor}.
*
* @param priority The priority which can be one of {@link NotificationCompat#PRIORITY_DEFAULT}, * @param priority The priority which can be one of {@link NotificationCompat#PRIORITY_DEFAULT},
* {@link NotificationCompat#PRIORITY_MAX}, {@link NotificationCompat#PRIORITY_HIGH}, {@link * {@link NotificationCompat#PRIORITY_MAX}, {@link NotificationCompat#PRIORITY_HIGH}, {@link
* NotificationCompat#PRIORITY_LOW} or {@link NotificationCompat#PRIORITY_MIN}. If not set * NotificationCompat#PRIORITY_LOW} or {@link NotificationCompat#PRIORITY_MIN}. If not set
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment