Search packages, repositories and app categories

Package detailsv0.0.4

device_information

A flutter plugin to get device information such as device IMEI number,model name,API level,CPU Type,Product Name etc for both android & iOS.

AndroidiOS
30-day downloads
369
Likes
112
Pub points
150

Install package

flutter pub add device_information

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

The device_information package is a Flutter plugin that enables developers to retrieve detailed device information across both Android and iOS platforms. It provides access to key hardware and software details such as IMEI number, model name, API level, CPU type, and product name. Designed for cross-platform compatibility, it simplifies the process of gathering device-specific data without writing platform-specific code. Ideal for analytics, device tracking, or app personalization features.

Use cases

  • Device tracking and identification
  • User analytics and reporting
  • App personalization based on device specs
  • Troubleshooting and diagnostics
  • License validation

Key features

  • Cross-platform support (Android & iOS)
  • Access to IMEI, model, API level, CPU type
  • Simple API integration
  • No native code required
  • Real-time device data retrieval

Suitable for

  • Developers building analytics tools
  • Apps requiring device-level identification
  • Enterprise or security-focused applications
  • Apps needing device compatibility checks

Considerations

  • IMEI access restricted on newer iOS versions
  • Requires proper permissions on Android
  • Privacy compliance needed for sensitive data
  • Limited to non-rooted devices on Android

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Device Information

A flutter plugin to get device information such as device IMEI number, model name, API level,CPU Type,Product Name etc for both android & iOS.

Installation

Add following dependency in pubspec.yaml file:

device_information:^0.0.4

Install by running:

$ flutter pub get 

Usage

import 'package:device_information/device_information.dart';

try {
      platformVersion = await DeviceInformation.platformVersion;
      imeiNo = await DeviceInformation.deviceIMEINumber;
      modelName = await DeviceInformation.deviceModel;
      manufacturer = await DeviceInformation.deviceManufacturer;
      apiLevel =  await DeviceInformation.apiLevel;
      deviceName = await DeviceInformation.deviceName;
      productName = await DeviceInformation.productName;
      cpuType = await DeviceInformation.cpuName;
      hardware = await DeviceInformation.hardware;
    } on PlatformException {
      platformVersion = 'Failed to get platform version.';
    }

In android add the following permission:

<uses-permission android:name="android.permission.READ_PHONE_STATE"/>

Then for API targetting from Marshmallow, need to request runtime permissions. Although in iOS there is no need to specify permissions.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Developer Team:

Hina Hussain & her team members (Kamran Khan, Abdul Sattar, Faiza Farooqui) :smile: :tada:

Follow me

https://hina-hussain-developer.medium.com/creating-publisher-account-on-the-pub-dev-cf86b91cd2f https://hinahussaindev.blogspot.com/2021/05/creating-publisher-account-on-pubdev.html

License

MIT

Categories

Source repository

Projects using this package

No data available yet.