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

outdated

A Flutter plugin for read SIM information. You can get SIM data for MCC, MNC, country code, etc There are similarities and differences between the data available on Android and iOS. Read the usage.

flutter_sim_info #

A Flutter plugin for read SIM information.
You can get SIM data for MCC, MNC, country code, etc...

Note: There are similarities and differences between the data available on Android and iOS. Read the usage.

Usage #

Import the package #

To use this plugin, follow the plugin installation instructions.

Use the plugin #

Add the following import to your Dart code:

import 'package:sim_info/sim_info.dart';

Use below to get SIM data:

  String _allowsVOIP;
  String _carrierName;
  String _isoCountryCode;
  String _mobileCountryCode;
  String _mobileNetworkCode;

  @override
  void initState() {
    super.initState();
    getUsimInfo();
  }

  void getUsimInfo() async {
    String allowsVOIP = await SimInfo.getAllowsVOIP;
    String carrierName = await SimInfo.getCarrierName;
    String isoCountryCode = await SimInfo.getIsoCountryCode;
    String mobileCountryCode = await SimInfo.getMobileCountryCode;
    String mobileNetworkCode = await SimInfo.getMobileNetworkCode;
  }

Full list of available SIM data.

Android integration #

Beginning with Android 6.0 (API level 23), you must obtain bellow permission before using methods.

Dangerous permissions READ_PHONE_STATE

Error message #

"PERMISSION_DENIED" // In android, you use methods before get permission.

"SIM_STATE_NOT_READY" // In android, cannot found SIM card in your device.

"Sim card not detected" // In iOS, cannot found SIM card in your device.

Screenshots #

API details #

See the WIKI for more API details.

Issues and feedback #

Please file issues to send feedback or report a bug. Thank you!

License #

MIT license.

28
likes
0
pub points
72%
popularity

Publisher

unverified uploader

A Flutter plugin for read SIM information. You can get SIM data for MCC, MNC, country code, etc There are similarities and differences between the data available on Android and iOS. Read the usage.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on sim_info