Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @Alezhka ,
Awesome plugin—nice work on this! I'd been waiting for a while for someone to write this and I'm glad you did! I've integrated it into my own project and ran into a few issues—some bugs, others required extensions. I've included all those changes in this PR. I'm happy to tweak as you prefer.
USE_FULL_SCREEN_INTENT
permission to be declared in theAndroidManifest
on newer versions of Android.iconName
in theConfigIOS
object would prevent the incoming call notification from being displayed on iOS devices. Added some nil-checking to display a warning message instead of failing.duration
, even if the call was accepted by the user. Corrected the timeout logic to end the call only if it isn’t being attended.MuteEvent
andDMTFEvent
events were not being dispatched. I corrected a copy-and-paste bug in the switch statement responsible for creating those events.DMTFEvent
is misspelled; it should beDTMFEvent
.mute
property onMuteEvent
was always null. I fixed the name of theMap
key used to populate it (wasmute
, but should bemuted
).android:theme="@style/AppCompatTheme”
toandroid:theme="@style/Theme.AppCompat"
in order to get the call notification to be displayed. Perhaps others will run into this, too…?displayIncomingCallAdvanced
) that offers several new named parameters for controlling this on iOS:supportsDTMF
,supportsHolding
,supportsGrouping
andsupportsUngrouping
. I also changed thehandle
andhandleType
attributes to be nullable for cases where a handle is not desired (which has the effect of disabling the “FaceTime” button).AVAudioSession
configuration (iOS). I suspect most applications that use this plugin will also be controlling theirAVAudioSession
elsewhere and will need fine-grained control over what attributes (if any) should be configured byflutter_incoming_call
. To that extent, I added new booleanConfigIOS
attributes:avSessionSetCategory
,avSessionSetMode
,avSessionSetPreferredSampleRate
,avSessionSetPreferredIOBufferDuration
andavSessionSetActive
. By default, all aretrue
(current behavior), but client applications can enable/disable which parameters are set. (My application needsavSessionSetMode
to be called, but none of the others, in order to function correctly)..gitignore
’d the Android Studio directories (.idea
) … but perhaps having them checked in was intentional? Some folks swear by this practice. :)