搜尋套件、儲存庫與 APP 分類

套件詳情v1.0.0

flutter_incall

適用於 iOS/Android 的 Flutter InCall Manager 外掛程式。

近 30 天下載
31
喜歡數
25
Pub 分數
25

安裝套件

flutter pub add flutter_incall

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

Flutter InCall Manager 是一個跨平台插件,適用於 Android 和 iOS,讓開發者能在 Flutter 應用中管理通話功能。它提供對裝置層級通話控制的存取,例如處理來電與去電、管理音訊路徑,以及監控通話狀態。該插件與原生通話 API 結合,提供無縫的通話管理體驗,非常適合 VoIP 應用、遠距醫療平台或需要即時通話處理的通訊工具。它支援背景通話作業,並可在兩個平台上與系統層級通話介面協同運作。

適用情境

  • VoIP 應用
  • 遠端醫療平台
  • 即時通訊工具
  • 呼叫中心軟體
  • 背景呼叫管理

主要特色

  • 原生呼叫狀態監控
  • 音訊路由管理
  • 來電/去電處理
  • 跨平台支援(iOS/Android)
  • 背景呼叫功能

適合對象

  • 開發 VoIP 應用的開發者
  • 需要即時通話控制的應用程式
  • 移動通訊平台
  • 醫療保健和遠端協助應用

使用建議

  • 需要平台特定權限
  • 僅限 iOS/Android
  • 可能需要額外設定以支援背景執行
  • 依賴原生 SDK 以實現完整功能

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

flutter_incall

Port from react-native-incall-manager

  • Handling media-routes/sensors/events during a audio/video chat on Flutter

add to pubspec:

flutter_incall: ^1.0.0

import

import 'package:flutter_incall/flutter_incall.dart';

API:

Methods

Method android ios description
start({media: ?string, auto: ?boolean, ringback: ?string}) :smile: :smile: start incall manager.
ringback accept non-empty string or it won't play
default: {media:'audio', auto: true, ringback: ''}
stop({busytone: ?string}) :smile: :smile: stop incall manager
busytone accept non-empty string or it won't play
default: {busytone: ''}
turnScreenOn() :smile: :rage: force turn screen on
turnScreenOff() :smile: :rage: force turn screen off
setKeepScreenOn(enable: ?boolean) :smile: :smile: set KeepScreenOn flag = true or false
default: false
setSpeakerphoneOn(enable: ?boolean) :smile: :rage: toggle speaker ON/OFF once. but not force
default: false
setForceSpeakerphoneOn(flag: ?boolean) :smile: :smile: true -> force speaker on
false -> force speaker off
null -> use default behavior according to media type
default: null
setMicrophoneMute(enable: ?boolean) :smile: :rage: mute/unmute micophone
default: false
p.s. if you use webrtc, you can just use track.enabled = false to mute
async checkRecordPermission() :smile: :smile: check record permission without promt. return Promise. see about permission section above
async requestRecordPermission() :smile: :smile: request record permission to user. return Promise. see about permission section above
startRingtone(ringtone: string, ?vibrate_pattern: array, ?ios_category: string, ?seconds: number) :smile: :smile: play ringtone.
ringtone: 'DEFAULT' or 'BUNDLE'
vibrate_pattern: same as RN, but does not support repeat
ios_category: ios only, if you want to use specific audio category
seconds: android only, specify how long do you want to play rather than play once nor repeat. in sec.
stopRingtone() :smile: :smile: stop play ringtone if previous started via startRingtone()
stopRingback() :smile: :smile: stop play ringback if previous started via start()
setFlashOn(enable: ?boolean, brightness: ?number) :rage: :smile: set flash light on/off
async getIsWiredHeadsetPluggedIn() :rage: :smile: return wired headset plugged in state

Events

Event android ios description
'Proximity' :smile: :smile: proximity sensor detected changes.
data: {'isNear': boolean}
'WiredHeadset' :smile: :smile: fire when wired headset plug/unplug
data: {'isPlugged': boolean, 'hasMic': boolean, 'deviceName': string }
'NoisyAudio' :smile: :rage: see andriod doc.
data: null
'MediaButton' :smile: :rage: when external device controler pressed button. see android doc
data: {'eventText': string, 'eventCode': number }
'onAudioFocusChange' :smile: :rage: see andriod doc
data: {'eventText': string, 'eventCode': number }

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。