Document how to set the priority on API level above 25

Issue: #7820
PiperOrigin-RevId: 328917063
This commit is contained in:
bachinger 2020-08-28 12:31:36 +01:00 committed by Oliver Woodman
parent 8a8a1517ec
commit 0045d20d2c

View file

@ -16,6 +16,7 @@
package com.google.android.exoplayer2.ui;
import android.app.Notification;
import android.app.NotificationChannel;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
import android.content.Context;
@ -877,6 +878,10 @@ public class PlayerNotificationManager {
*
* <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},
* {@link NotificationCompat#PRIORITY_MAX}, {@link NotificationCompat#PRIORITY_HIGH}, {@link
* NotificationCompat#PRIORITY_LOW} or {@link NotificationCompat#PRIORITY_MIN}. If not set