Last updated:
0 purchases
flutter incall
flutter-incall-manager #
Port from react-native-incall-manager #
Handling media-routes/sensors/events during a audio/video chat on Flutter
API: #
Methods
Method
android
ios
description
start({media: ?string, auto: ?boolean, ringback: ?string})
😄
😄
start incall manager. ringback accept non-empty string or it won't playdefault: {media:'audio', auto: true, ringback: ''}
stop({busytone: ?string})
😄
😄
stop incall manager busytone accept non-empty string or it won't play default: {busytone: ''}
turnScreenOn()
😄
😡
force turn screen on
turnScreenOff()
😄
😡
force turn screen off
setKeepScreenOn(enable: ?boolean)
😄
😄
set KeepScreenOn flag = true or falsedefault: false
setSpeakerphoneOn(enable: ?boolean)
😄
😡
toggle speaker ON/OFF once. but not forcedefault: false
setForceSpeakerphoneOn(flag: ?boolean)
😄
😄
true -> force speaker on false -> force speaker off null -> use default behavior according to media typedefault: null
setMicrophoneMute(enable: ?boolean)
😄
😡
mute/unmute micophonedefault: falsep.s. if you use webrtc, you can just use track.enabled = false to mute
async checkRecordPermission()
😄
😄
check record permission without promt. return Promise. see about permission section above
async requestRecordPermission()
😄
😄
request record permission to user. return Promise. see about permission section above
startRingtone(ringtone: string, ?vibrate_pattern: array, ?ios_category: string, ?seconds: number)
😄
😄
play ringtone. ringtone: 'DEFAULT' or 'BUNDLE'vibrate_pattern: same as RN, but does not support repeatios_category: ios only, if you want to use specific audio categoryseconds: android only, specify how long do you want to play rather than play once nor repeat. in sec.
stopRingtone()
😄
😄
stop play ringtone if previous started via startRingtone()
stopRingback()
😄
😄
stop play ringback if previous started via start()
setFlashOn(enable: ?boolean, brightness: ?number)
😡
😄
set flash light on/off
async getIsWiredHeadsetPluggedIn()
😡
😄
return wired headset plugged in state
Events
Event
android
ios
description
'Proximity'
😄
😄
proximity sensor detected changes.data: {'isNear': boolean}
'WiredHeadset'
😄
😄
fire when wired headset plug/unplugdata: {'isPlugged': boolean, 'hasMic': boolean, 'deviceName': string }
'NoisyAudio'
😄
😡
see andriod doc.data: null
'MediaButton'
😄
😡
when external device controler pressed button. see android doc data: {'eventText': string, 'eventCode': number }
'onAudioFocusChange'
😄
😡
see andriod doc data: {'eventText': string, 'eventCode': number }
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.