搜索插件、代码仓与 APP 分类

flutter_incoming_call 封面
插件详情v0.1.2

flutter_incoming_call

一个 Flutter 插件,可在您的 Flutter 应用中显示来电!

AndroidiOS
近 30 天下载
38
喜欢数
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.

所属分类

源码仓库

使用此插件的项目

暂无相关数据。