disable the alert_only_once flag at incoming call notifications
This commit is contained in:
parent
9e015c3888
commit
48a7eb3c72
|
@ -57,7 +57,7 @@ class DialerCallService : Service() {
|
||||||
|
|
||||||
@TargetApi(Build.VERSION_CODES.O)
|
@TargetApi(Build.VERSION_CODES.O)
|
||||||
private fun setupNotification() {
|
private fun setupNotification() {
|
||||||
val channelId = "simple_contacts_channel"
|
val channelId = "incoming_call"
|
||||||
if (isOreoPlus()) {
|
if (isOreoPlus()) {
|
||||||
val notificationManager = getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
|
val notificationManager = getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
|
||||||
val name = resources.getString(R.string.app_name)
|
val name = resources.getString(R.string.app_name)
|
||||||
|
@ -94,7 +94,7 @@ class DialerCallService : Service() {
|
||||||
.setCategory(NotificationCompat.CATEGORY_CALL)
|
.setCategory(NotificationCompat.CATEGORY_CALL)
|
||||||
.setChannelId(channelId)
|
.setChannelId(channelId)
|
||||||
.setSound(null)
|
.setSound(null)
|
||||||
.setOnlyAlertOnce(true)
|
.setOnlyAlertOnce(false)
|
||||||
.setUsesChronometer(callStatus == Call.STATE_ACTIVE)
|
.setUsesChronometer(callStatus == Call.STATE_ACTIVE)
|
||||||
|
|
||||||
startForeground(CALL_NOTIFICATION_ID, notification.build())
|
startForeground(CALL_NOTIFICATION_ID, notification.build())
|
||||||
|
|
Loading…
Reference in New Issue