flutter_telephony_info 0.0.1 copy "flutter_telephony_info: ^0.0.1" to clipboard
flutter_telephony_info: ^0.0.1 copied to clipboard

PlatformAndroid

A plugin to retrieve information from the android telephony library.

Flutter telephony plugin #

A minimal platform plugin that works through the 'Pigeon' code generator to interact with an Android device in order to retrieve information from the 'Telephony' module of the Android platform. #

Flutter telephony plugin gets:

  • name cellular service provider;
  • mobile network code (MNC);
  • mobile network generation (LTE, HSDPA, e.t.c);
  • mobile network radioType (5G, 4G ... 2G);
  • cell id (cid);
  • cell signal strenght.

The minimum required SDK of the application is 30

.\android\app\build.gradle

defaultConfig {

...

//      minSdkVersion flutter.minSdkVersion
        minSdkVersion 30

...

    }

The following Android permissions are required for the plugin to work

<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>

Don't forget to turn on GPS

Usage #

  import 'package:flutter_telephony_info/flutter_telephony_info.dart';

  final _flutterTelephonyInfoPlugin = TelephonyAPI();
  List<TelephonyInfo?>? telephonyInfo;
  try {
      telephonyInfo = await _flutterTelephonyInfoPlugin.getInfo();
    } on PlatformException {
      telephonyInfo = null;
    }

  telephonyInfo?.first?.displayName

Changelog #

Refer to the Changelog to get all release notes.

Features and bugs #

Please file feature requests and bugs at the issue tracker.

License #

WTFPL

5
likes
150
pub points
72%
popularity

Publisher

unverified uploader

A plugin to retrieve information from the android telephony library.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on flutter_telephony_info