File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
android/src/main/kotlin/com/hiennv/flutter_callkit_incoming Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -180,6 +180,11 @@ class CallkitNotificationManager(
180180 val notificationId =
181181 data.getString(CallkitConstants .EXTRA_CALLKIT_ID , " callkit_incoming" ).hashCode()
182182 createNotificationChanel(data)
183+
184+ if (incomingChannelEnabled()) {
185+ callkitSoundPlayerManager?.play(data)
186+ }
187+
183188 notificationBuilder = NotificationCompat .Builder (context, NOTIFICATION_CHANNEL_ID_INCOMING )
184189 notificationBuilder?.setChannelId(NOTIFICATION_CHANNEL_ID_INCOMING )
185190 notificationBuilder?.setDefaults(NotificationCompat .DEFAULT_VIBRATE )
@@ -993,9 +998,6 @@ class CallkitNotificationManager(
993998 @SuppressLint(" MissingPermission" )
994999 fun showIncomingNotification (data : Bundle ) {
9951000
996- if (incomingChannelEnabled()) {
997- callkitSoundPlayerManager?.play(data)
998- }
9991001 val callkitNotification = getIncomingNotification(data)
10001002 callkitNotification?.let {
10011003 getNotificationManager().notify(
You can’t perform that action at this time.
0 commit comments