Skip to content

App Crash on Missed Call on Android #319

@nfenyi

Description

@nfenyi

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)
        // }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions