Search packages, repositories and app categories

phone_state_handler cover
Package detailsv1.0.1

phone_state_handler

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.

AndroidiOS
30-day downloads
8
Likes
1
Pub points
150

Install package

flutter pub add phone_state_handler

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

The phone_state_handler package provides a simple way to monitor incoming calls and current call states on Android and iOS devices. It enables apps to detect when a call is incoming, ongoing, or ended, allowing for responsive behavior during phone interactions. Designed for developers building communication or productivity apps, it integrates seamlessly with Flutter and offers real-time updates through event listeners. The package leverages native platform APIs to deliver accurate call status information without requiring complex setup.

Use cases

  • Real-time call detection in messaging apps
  • Automated call handling in productivity tools
  • Integration with telehealth or customer service platforms
  • Monitoring call status during app usage
  • Enabling do-not-disturb logic based on call state

Key features

  • Detect incoming and ongoing calls
  • Monitor call state changes (idle, ringing, active)
  • Cross-platform support for Android and iOS
  • Simple event-based API
  • Lightweight and easy to integrate

Suitable for

  • Developers building communication apps
  • Apps requiring call status awareness
  • Mobile utilities needing real-time phone state monitoring
  • Flutter projects targeting both Android and iOS

Considerations

  • Requires appropriate permissions on Android and iOS
  • Limited to call state detection, not call control
  • May require background execution permissions on some devices
  • Depends on native platform capabilities for accuracy

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

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.

Categories

Source repository

Projects using this package

No data available yet.