套件概覽
device_call_checker 套件是一個 Flutter 外掛程式,可讓應用程式偵測裝置目前是否處於通話狀態,包含傳統電話通話與 VoIP 通話。它為 Android 與 iOS 平台提供簡單的 API 來檢查通話狀態,讓應用程式能動態回應正在進行的通話——例如暫停音訊播放或調整通知行為。此外掛程式可透過 pub.dev 隨意整合至現有的 Flutter 專案中。
適用情境
- 檢測對暫停媒體播放的主動呼叫
- 調整正在進行通話時的應用行為
- 實現呼叫感知通知
- 防止通話期間出現音頻衝突
- 支援VoIP應用
主要特色
- Cross-platform support for Android and iOS
- Simple API for checking call state
- Real-time call status detection
- Lightweight and easy to integrate
- Works with both regular and VoIP calls
適合對象
- 音訊和音樂應用
- VoIP 和通訊應用
- 需要通話感知邏輯的應用程式
- 開發即時互動功能的開發者
- 需要系統級通話檢測的移動應用
使用建議
- Requires appropriate platform permissions
- May not detect all background call states reliably
- iOS requires additional configuration in Info.plist
- Limited to call state detection only
- Depends on underlying OS call management APIs