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

flutter_incoming_call 封面
套件詳情v0.1.2

flutter_incoming_call

一個 Flutter 插件,可在您的 Flutter 應用中顯示來電!

AndroidiOS
近 30 天下載
50
喜歡數
43
Pub 分數
140

安裝套件

flutter pub add flutter_incoming_call

套件介紹

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

一個 Flutter 插件,可讓您的應用程式在 Android 和 iOS 裝置上顯示來電介面。它允許開發人員建立自訂通話 UI、管理通話狀態,並透過系統級整合處理來電。此外,該插件專為需要即時通訊功能的應用程式(例如 VoIP 或遠端醫療應用)設計。它利用原生平台功能,確保在兩個作業系統上實現可靠的效能與使用者體驗。

適用情境

  • VoIP通話應用
  • 遠端醫療平台
  • 即時通訊服務
  • 自定義呼叫介面實作
  • 緊急警告系統

主要特色

  • 原生來電介面支援
  • 跨平台 Android 與 iOS 相容性
  • 呼叫狀態管理
  • 系統級呼叫處理
  • 可自訂的通話介面設計

適合對象

  • 開發 VoIP 應用程式的開發者
  • 需要即時通話通知的應用
  • 醫療或緊急回應軟體
  • 行動通訊平台

使用建議

  • 需要原生平台權限
  • 可能需要額外設定以支援背景執行
  • 僅限模擬撥打電話,而非實際電話通話
  • 依賴於設備特定的行為
  • 不適合傳統的電話通話路由

原始 README

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

flutter_incoming_call

A Flutter plugin to show incoming call in your Flutter app! Alpha version(not ready for production!)

Usage

To use this plugin:

  1. Configure android project: Just add to your manifest activity and receiver.
<activity
    android:name="com.github.alezhka.flutter_incoming_call.IncomingCallActivity"
    android:theme="@style/Theme.AppCompat"
    android:screenOrientation="portrait"
    android:showOnLockScreen="true">
    <intent-filter>
        <action android:name="com.github.alezhka.flutter_incoming_call.activity.ACTION_INCOMING_CALL" />
        <category android:name="android.intent.category.DEFAULT" />
    </intent-filter>
</activity>

<receiver android:name="com.github.alezhka.flutter_incoming_call.CallBroadcastReceiver"
    android:enabled="true"
    android:exported="false"/>
  1. Configure Flutter plugin:
FlutterIncomingCall.configure(
    appName: 'example_incoming_call',
    duration: 30000,
    android: ConfigAndroid(
        vibration: true,
        ringtonePath: 'default',
        channelId: 'calls',
        channelName: 'Calls channel name',
        channelDescription: 'Calls channel description',
    ),
    ios: ConfigIOS(
        iconName: 'AppIcon40x40',
        ringtonePath: null,
        includesCallsInRecents: false,
        supportsVideo: true,
        maximumCallGroups: 2,
        maximumCallsPerCallGroup: 1,
    )
)
  1. Listen events:
FlutterIncomingCall.onEvent.listen((event) {
    if(event is CallEvent) { // Android | IOS
    } else if(event is HoldEvent) { // IOS
    } else if(event is MuteEvent) { // IOS
    } else if(event is DmtfEvent) { // IOS
    } else if(event is AudioSessionEvent) { // IOS
    }
});
  1. Call api:
FlutterIncomingCall.displayIncomingCall(String uid, String name, String avatar, String handle, String type, bool isVideo);
FlutterIncomingCall.endCall(String uuid);
FlutterIncomingCall.endAllCalls();

Demo

ios ios (Lockscreen) Android Android (Lockscreen)

Example

Check out the example in the example project folder for a working example.

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。