android_id 0.3.6 copy "android_id: ^0.3.6" to clipboard
android_id: ^0.3.6 copied to clipboard

PlatformAndroid

A Flutter plugin for getting the Android ID. Only for Android.

android_id #

Flutter Community: android_id

Pub Version

A Flutter plugin for retrieving the Android ID.

Getting started #

  • Add plugin to pubspec.yaml
  • Use it in your code (see examples of all methods below)

Usage #

const _androidIdPlugin = AndroidId();

final String? androidId = await _androidIdPlugin.getId();

Important #

Please note that on Android 8 and above, the Android ID is not unique per device, but also per signing key the app was built with:

On Android 8.0 (API level 26) and higher versions of the platform, a 64-bit number (expressed as a hexadecimal string), unique to each combination of app-signing key, user, and device.

The value may change if a factory reset is performed on the device or if an APK signing key changes.

Android API reference

Stack Overflow explanation

Google Play #

Before using this plugin in your app, make sure to follow Google Play guidelines. For example here:

Persistent identifiers, including Android ID

Use for non-advertising purposes
You can use persistent identifiers as long as you have a privacy policy and handle the data in accordance with the Developer Distribution Agreement and all applicable privacy laws in the areas where you make your app available.

100
likes
140
pub points
99%
popularity

Publisher

verified publisherachim.io

A Flutter plugin for getting the Android ID. Only for Android.

Repository (GitHub)
View/report issues

Topics

#androidid #device #identifier #android #native

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

flutter

More

Packages that depend on android_id