Handle bluetooth device call answer/reject/end button clicks in Telecom Framework

This commit is contained in:
Juha Heinanen
2026-04-30 13:59:39 +03:00
parent 8389abe0bd
commit 3c0bcec2cf

View File

@ -175,6 +175,11 @@ class ConnectionService : ConnectionService() {
override fun onAnswer() {
Log.d(TAG, "Telecom Connection onAnswer $callp")
val answerIntent = Intent(this@ConnectionService, BaresipService::class.java)
answerIntent.action = "Call Answer"
answerIntent.putExtra("uap", uap)
answerIntent.putExtra("callp", callp)
startService(answerIntent)
val intent = Intent(this@ConnectionService, MainActivity::class.java)
intent.flags = Intent.FLAG_ACTIVITY_SINGLE_TOP or Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_NEW_TASK
intent.putExtra("action", "call answer")