File tree Expand file tree Collapse file tree 2 files changed +20
-3
lines changed
notify/src/main/java/com/kylecorry/andromeda/notify Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change 1
1
import com.vanniktech.maven.publish.AndroidSingleVariantLibrary
2
2
import com.vanniktech.maven.publish.SonatypeHost
3
3
4
- val versionName = " 15.0 .0"
4
+ val versionName = " 15.1 .0"
5
5
val groupId = " com.kylecorry.andromeda"
6
6
7
7
buildscript {
Original file line number Diff line number Diff line change @@ -37,8 +37,25 @@ object Notify {
37
37
}
38
38
}
39
39
40
- fun send (context : Context , notificationId : Int , notification : Notification ) {
41
- getNotificationManager(context)?.notify(notificationId, notification)
40
+ fun send (
41
+ context : Context ,
42
+ notificationId : Int ,
43
+ notification : Notification ,
44
+ overrideSystemGrouping : Boolean = false,
45
+ groupSummaryNotificationId : Int = notificationId
46
+ ) {
47
+ val manager = getNotificationManager(context)
48
+ if (overrideSystemGrouping && Build .VERSION .SDK_INT >= Build .VERSION_CODES .BAKLAVA ) {
49
+ val summary = NotificationCompat
50
+ .Builder (context, notification)
51
+ .setGroupSummary(true )
52
+ .setSound(null )
53
+ .setVibrate(null )
54
+ .build()
55
+ manager?.notify(groupSummaryNotificationId, summary)
56
+ }
57
+
58
+ manager?.notify(notificationId, notification)
42
59
}
43
60
44
61
/* *
You can’t perform that action at this time.
0 commit comments