Slide 35
Slide 35 text
$MJDLBDUJPOPG3FNPUF7JFXT
private fun showIncomingCallNotification(channelId: String) {
...
val remoteView = RemoteViews(packageName, R.layout.incoming_call_notification).apply {
setOnClickPendingIntent(R.id.acceptBtn, getAcceptIntent(id))
...
}
NotificationCompat.Builder(this, channelId)
.setCustomBigContentView(remoteView)
...
.build()
...
}
private fun getAcceptIntent(id: Long): PendingIntent {
val intent = Intent(this, IncomingCallReceiver::class.java)
...
return PendingIntent.getBroadcast(this, REQUEST_ACCEPT,
intent, PendingIntent.FLAG_UPDATE_CURRENT)
}