パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v1.0.2

sim_card_info

通信関連アプリに最適な、キャリア名、電話番号、国コードなどのSIMカード情報を取得するためのFlutterプラグイン。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
1680
いいね数
29
Pub ポイント
140

パッケージをインストール

flutter pub add sim_card_info

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

sim_card_info パッケージは、複数のプラットフォームでキャリア名、電話番号、国コードなどのSIMカード情報を取得できるFlutterプラグインです。リアルタイムのSIMデータが必要な通信関連アプリを開発する開発者向けに設計されています。Android、iOS、Web、macOS、Windows、Linuxをサポートしており、広範な互換性を確保しています。シンプルなAPIにより、ユーザーのモバイルネットワーク情報が必要なアプリへの統合を容易にします。プラットフォームチャネルを通じてネイティブプラットフォーム機能を利用し、権限が付与された場合に信頼性の高いデータを提供します。

用途

  • 通信アプリ開発
  • 電話番号検出によるユーザーのオンボーディング
  • キャリアベースのサービスパーソナライゼーション
  • SIMカード検証ワークフロー
  • モバイルネットワーク診断

主な機能

  • キャリア名にアクセスする
  • 電話番号を取得する
  • 国コードを提供します
  • クロスプラットフォーム対応
  • シンプルな API インテグレーション
  • 権限を意識したデザイン

適している対象

  • 通信アプリを開発する開発者
  • SIMベースのユーザー識別を必要とするアプリ
  • マルチプラットフォームモバイルアプリケーション
  • ネットワークキャリア情報が必要なサービス

注意事項

  • Android および iOS で実行時権限が必要です
  • 一部のデバイスではデータの利用可能性が制限されています
  • Webサポートには制限が適用される場合があります
  • プライバシー準拠が必要
  • すべてのハードウェア構成で利用可能ではない

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

sim_card_info

A Flutter plugin to get SIM card information.

Features

  • Fetches SIM card information from the device.
  • Handles exceptions and returns appropriate messages.

Getting Started

Installation

Add sim_card_info to your pubspec.yaml file:

dependencies:
  sim_card_info: ^1.0.0

then run flutter pub get in your terminal.

Usage

Import
import 'package:sim_card_info/sim_card_info.dart';
Get SIM card information
final _simCardInfoPlugin = SimCardInfo();
List<SimInfo>? _simInfo;

// Retrieve SIM card information
simCardInfo = await _simCardInfoPlugin.getSimInfo() ?? [];
Handling Exceptions

In cases where retrieving information fails, especially on certain devices like iOS, utilize a try/catch block with a PlatformException:

  Future<void> initSimInfoState() async {
  List<SimInfo>? simCardInfo;
  // Platform messages may fail, so we use a try/catch PlatformException.
  // We also handle the message potentially returning null.
  try {
    simCardInfo = await _simCardInfoPlugin.getSimInfo() ?? [];
  } on PlatformException {
    simCardInfo = [];
    setState(() {
      isSupported = false;
    });
  }

  // If the widget was removed from the tree while the asynchronous platform
  // message was in flight, we want to discard the reply rather than calling
  // setState to update our non-existent appearance.
  if (!mounted) return;
  setState(() {
    _simInfo = simCardInfo;
  });
}

Permissions

refer to example directory for a complete sample app usingsim_card_info plugin.

Issues and feedback

For any issue or feedback please create an issue.

License

This project is licensed under the MIT License - see the LICENSE file for details.

カテゴリー

依存関係

依存関係一覧 1 件

  • plugin_platform_interface^2.1.8

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。