Giter Club home page Giter Club logo

data_usage's Introduction

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.

data_usage's People

Contributors

zfinix avatar akora-ingdkb avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.