show contact name (if available) also in incoming notification
This commit is contained in:
@ -255,7 +255,8 @@ class BaresipService: Service() {
|
|||||||
.setColor(0x0ca1fd)
|
.setColor(0x0ca1fd)
|
||||||
.setContentIntent(npi)
|
.setContentIntent(npi)
|
||||||
.setAutoCancel(true)
|
.setAutoCancel(true)
|
||||||
.setContentTitle("Call from ${Api.call_peeruri(callp)}")
|
.setContentTitle("Call from ${ContactsActivity.contactName(
|
||||||
|
Api.call_peeruri(callp))}")
|
||||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
|
||||||
cnb.setVibrate(LongArray(0))
|
cnb.setVibrate(LongArray(0))
|
||||||
.setVisibility(VISIBILITY_PRIVATE)
|
.setVisibility(VISIBILITY_PRIVATE)
|
||||||
@ -298,7 +299,7 @@ class BaresipService: Service() {
|
|||||||
intent.putExtra("callp", callp)
|
intent.putExtra("callp", callp)
|
||||||
LocalBroadcastManager.getInstance(this).sendBroadcast(intent)
|
LocalBroadcastManager.getInstance(this).sendBroadcast(intent)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun updateStatusNotification() {
|
private fun updateStatusNotification() {
|
||||||
val contentView = RemoteViews(getPackageName(), R.layout.status_notification)
|
val contentView = RemoteViews(getPackageName(), R.layout.status_notification)
|
||||||
for (i: Int in 0 .. 5) {
|
for (i: Int in 0 .. 5) {
|
||||||
|
|||||||
Reference in New Issue
Block a user