Issue Summary
App crashes when a missed call occurs while the flutter android app is running in the background.
i resolved this issue by commenting out the if condition in the onCancelledCallInvite method and uncommenting the startService line like so in VoiceFirebaseMessagingService.kt:
override fun onCancelledCallInvite(cancelledCallInvite: CancelledCallInvite, callException: CallException?) {
Log.d(TAG, "onCancelledCallInvite: ", callException)
Intent(applicationContext, TVConnectionService::class.java).apply {
action = TVConnectionService.ACTION_CANCEL_CALL_INVITE
putExtra(TVConnectionService.EXTRA_CANCEL_CALL_INVITE, cancelledCallInvite)
applicationContext.startService(this)
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
// applicationContext.startForegroundService(this) // Ensure it's started as a foreground service
// } else {
// applicationContext.startService(this)
// }
}
}
Issue Summary
App crashes when a missed call occurs while the flutter android app is running in the background.
i resolved this issue by commenting out the if condition in the onCancelledCallInvite method and uncommenting the startService line like so in VoiceFirebaseMessagingService.kt: