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

data_usage のカバー
パッケージ詳細v1.0.3

data_usage

モバイルデバイス上のデータ使用量を取得するためのFlutterプラグイン

AndroidiOS
30日間ダウンロード
65
いいね数
22
Pub ポイント
120

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

flutter pub add data_usage

パッケージ概要

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

data_usage パッケージは、Android および iOS デバイス上でリアルタイムのデータ使用状況統計情報を取得できる Flutter プラグインです。セルラー通信および Wi-Fi のデータ消費量にアクセスでき、ユーザーがネットワーク使用状況を監視するのに役立ちます。クロスプラットフォーム互換性を考慮して設計されており、最小限のセットアップで Flutter アプリケーションにシームレスに統合できます。ネイティブデバイスAPIを活用することで正確なデータ収集を実現し、ネットワーク管理、課金、ユーザー意識向上を目的としたアプリに最適です。軽量な設計により、アプリの応答性に影響を与えることなく効率的なパフォーマンスを発揮します。

用途

  • モバイルデータ使用量の監視
  • ネットワーク使用状況ダッシュボードの構築
  • アプリケーションにデータアラートを統合する
  • 請求またはクォーターシステムのサポート
  • ネットワーク健全性モニタリングツールの作成

主な機能

  • クロスプラットフォーム対応(Android および iOS)
  • リアルタイムでのデータ使用量の取得
  • 最小限のセットアップとインテグレーション
  • 正確なネイティブAPIアクセス
  • 軽量でパフォーマンスに優れる

適している対象

  • ネットワークモニタリングアプリ
  • モバイルユーティリティツール
  • 請求およびクォータトラッキング
  • ユーザー向けデータダッシュボード
  • ネットワーク分析用の開発者ツール

注意事項

  • 両方のプラットフォームで適切な権限が必要です
  • データの正確性は、デバイスメーカーによって異なる場合があります
  • 基本的なデータ使用メトリクスに限定
  • バックグラウンド実行権限が必要になる場合があります
  • ウェブまたはデスクトッププラットフォームでは利用できません

元の README

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

Data Usage

Data Usage gets Mobile/Wifi data usage values from mobile devices, on android it will fetch the data per app but due to current limitations on ios it can only give the total/complete values of overall data used.

Screen Shots

Usage for Android

  • Initialize plugin and requests for permission
  • Request Data usage stats
  DataUsageModel.init() // Only Required for Android
  List<DataUsageModel> dataUsage = await DataUsage.dataUsageAndroid(
     withAppIcon: true, // if false `DataUsageModel.appIconBytes` will be null
     dataUsageType: DataUsageType.wifi, // DataUsageType.wifi | DataUsageType.mobile
     oldVersion: false // will be true for Android versions lower than 23 (MARSHMELLOW)
   );

This would return:

   [   ...,
      DataUsageModel({
            String appName; //App's Name
            String packageName; // App's package name
            Uint8List appIconBytes; // Icon in bytes
            int received; // Amount of data Received
            int sent; // Amount of data sent/transferred
      })
   ]

For more explanation

Usage for iOS

Request for Total data usage on iOS devices

  IOSDataUsageModel dataUsage = await DataUsage.dataUsageIOS();

This would return:

  IOSDataUsageModel({
     int wifiCompelete, // Total Amount of wifi data (received + sent)
     int wifiReceived, // Amount of wifi data Received
     int wifiSent, // Amount of data sent/transferred
     int wwanCompelete, // Total Amount of mobile data (received + sent)
     int wwanReceived, // Amount of mobile data Received
     int wwanSent // Amount of data sent/transferred
  });

Contribution

Lots of PR's would be needed to make this plugin standard, as for iOS there's a permanent limitation for getting the exact data usage, there's only one way arount it and it's super complex.

カテゴリー

ソースリポジトリ

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

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