Awesome
android_id
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:
The value may change if a factory reset is performed on the device or if an APK signing key changes.
</blockquote>Google Play
Before using this plugin in your app, make sure to follow Google Play guidelines. For example here:
<blockquote> <b>Persistent identifiers, including Android ID</b>Use for non-advertising purposes<br> 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.
</blockquote>