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

PlatformAndroid

A plugin to retrieve information from the android telephony library.

Flutter telephony plugin #

Pub Pub Version Pub Points License: WTFPL Linter

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. #


Attention! This plugin works with Android version 12 and higher! #


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 #

END-USER LICENSE AGREEMENT

5
likes
140
pub points
73%
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