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

phone_state_handler 封面
套件詳情v1.0.1

phone_state_handler

此外掛程式可讓您快速且輕鬆地了解您的 Android 或 iOS 裝置是否正在接收來電,以及通話狀態。

AndroidiOS
近 30 天下載
8
喜歡數
1
Pub 分數
150

安裝套件

flutter pub add phone_state_handler

套件介紹

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

phone_state_handler 套件提供了一種簡單的方式,用於監控 Android 與 iOS 裝置上的來電與目前通話狀態。它讓應用程式能夠偵測到來電、通話進行中或通話結束的時刻,進而於電話互動期間實現回應式行為。此套件專為開發通訊或生產力應用的開發者設計,可與 Flutter 無縫整合,並透過事件監聽器提供即時更新。該套件利用原生平台 API 來提供準確的通話狀態資訊,無需複雜設定。

適用情境

  • 即時通訊應用中的即時通話檢測
  • 生產力工具中的自動呼叫處理
  • 與遠端醫療或客戶服務平台的整合
  • 監控應用使用期間的通話狀態
  • 基於通話狀態啟用勿擾邏輯

主要特色

  • 偵測來電與進行中的通話
  • 監控通話狀態變更(閒置、鈴聲、進行中)
  • Android 與 iOS 的跨平台支援
  • 簡單的事件驅動式 API
  • 輕量且易於整合

適合對象

  • 開發通訊應用的開發者
  • 需要通話狀態感知的應用
  • 需要即時手機狀態監控的移動工具
  • Flutter 專案同時針對 Android 和 iOS

使用建議

  • Android 和 iOS 需要適當的權限
  • 僅限通話狀態偵測,不支援通話控制
  • 某些裝置可能需要背景執行權限
  • 依賴原生平台功能以確保精確度

原始 README

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

DESCRIPTION

This plugin modified from phone_state

This plugin allows you to know quickly and easily if your Android or iOS device is receiving a call and to know the status of the call.

PAY ATTENTION

  • In the iOS simulator doesn't work
  • The phone number is only obtainable on Android!

HOW TO INSTALL

Flutter
dependencies:
  flutter:
    sdk: flutter
  phone_state: 1.0.1
Android: Added permission on manifest
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.READ_CALL_LOG" />

Warning: Adding READ_CALL_LOG permission, your app will be removed from the Play Store if you don't have a valid reason to use it. Read more. But if you don't add it, you will not be able to know caller's number.

HOW TO USE

Get stream phone state status
StreamBuilder<PhoneState>(
  initialData: PhoneState.nothing(),
  stream: PhoneState.stream,
  ...
)

SCREENSHOT

Write me in the GitHub issues the new features you need and, if they are approved of course, I will implement them as soon as I can.

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。