added Toast telling why call was closed

This commit is contained in:
Juha Heinanen
2018-12-27 12:35:57 +02:00
parent 18196fdd30
commit 3b65fb116f

View File

@ -636,6 +636,15 @@ class MainActivity : AppCompatActivity() {
baresipService.setAction("ToggleSpeaker")
startService(baresipService)
}
val param = ev[1].trim()
if (param != "") {
if (param.get(0).isDigit())
Toast.makeText(applicationContext, "Call failed: $param",
Toast.LENGTH_LONG).show()
else
Toast.makeText(applicationContext, "Call closed: $param",
Toast.LENGTH_LONG).show()
}
}
"message" -> {
val peerUri = params[1]