show a light at reminder notification
This commit is contained in:
parent
4010daf08e
commit
d77e55582b
|
@ -37,7 +37,7 @@ class NotificationReceiver : BroadcastReceiver() {
|
||||||
context.scheduleNextEvent(event)
|
context.scheduleNextEvent(event)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getEventTime(startTime: String, endTime: String) = if (startTime == endTime) startTime else startTime + " - " + endTime
|
private fun getEventTime(startTime: String, endTime: String) = if (startTime == endTime) startTime else ("$startTime - $endTime")
|
||||||
|
|
||||||
private fun getPendingIntent(context: Context, event: Event): PendingIntent {
|
private fun getPendingIntent(context: Context, event: Event): PendingIntent {
|
||||||
val intent = Intent(context, EventActivity::class.java)
|
val intent = Intent(context, EventActivity::class.java)
|
||||||
|
@ -52,6 +52,7 @@ class NotificationReceiver : BroadcastReceiver() {
|
||||||
.setContentText(content)
|
.setContentText(content)
|
||||||
.setSmallIcon(R.mipmap.calendar)
|
.setSmallIcon(R.mipmap.calendar)
|
||||||
.setContentIntent(pendingIntent)
|
.setContentIntent(pendingIntent)
|
||||||
|
.setDefaults(Notification.DEFAULT_LIGHTS)
|
||||||
.setAutoCancel(true)
|
.setAutoCancel(true)
|
||||||
.setSound(soundUri)
|
.setSound(soundUri)
|
||||||
.build()
|
.build()
|
||||||
|
|
Loading…
Reference in New Issue