mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 01:53:31 +00:00
feat: add notification groups
This commit is contained in:
parent
c0f5abdfae
commit
383fbd1c49
2 changed files with 39 additions and 1 deletions
|
|
@ -1,7 +1,9 @@
|
|||
package com.cappielloantonio.tempo.util;
|
||||
|
||||
import android.app.Notification;
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.core.app.NotificationCompat;
|
||||
import androidx.media3.common.util.UnstableApi;
|
||||
import androidx.media3.database.DatabaseProvider;
|
||||
import androidx.media3.database.StandaloneDatabaseProvider;
|
||||
|
|
@ -182,4 +184,14 @@ public final class DownloadUtil {
|
|||
|
||||
return files;
|
||||
}
|
||||
|
||||
public static Notification buildGroupSummaryNotification(Context context, String channelId, String groupId, int icon, String title) {
|
||||
return new NotificationCompat.Builder(context, channelId)
|
||||
.setContentTitle(title)
|
||||
.setSmallIcon(icon)
|
||||
.setGroup(groupId)
|
||||
.setGroupSummary(true)
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue