Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fluttercommunity/android_id
Maintainer: @nohli
https://github.com/fluttercommunity/android_id
android dart flutter hacktoberfest
Last synced: 1 day ago
JSON representation
Maintainer: @nohli
- Host: GitHub
- URL: https://github.com/fluttercommunity/android_id
- Owner: fluttercommunity
- License: bsd-3-clause
- Created: 2022-08-03T18:29:45.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-13T18:48:00.000Z (5 months ago)
- Last Synced: 2024-06-21T15:45:53.205Z (5 months ago)
- Topics: android, dart, flutter, hacktoberfest
- Language: Dart
- Homepage: https://pub.dev/packages/android_id
- Size: 356 KB
- Stars: 29
- Watchers: 3
- Forks: 9
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# android_id
[![Flutter Community: android_id](https://fluttercommunity.dev/_github/header/android_id)](https://github.com/fluttercommunity/community)
![Pub Version](https://img.shields.io/pub/v/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
```dart
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](https://developer.android.com/reference/android/provider/Settings.Secure#ANDROID_ID)
[Stack Overflow explanation](https://stackoverflow.com/a/43393373)
## Google Play
Before using this plugin in your app, make sure to follow Google Play guidelines.
For example [here](https://support.google.com/googleplay/android-developer/answer/6048248#zippy=%2Cpersistent-identifiers-including-android-id):
Persistent identifiers, including Android IDUse for non-advertising purposes
You can use persistent identifiers as long as you have a [privacy policy](https://support.google.com/googleplay/android-developer/answer/9859455) and handle the data in accordance with the [Developer Distribution Agreement](https://play.google.com/about/developer-distribution-agreement.html#use) and all applicable privacy laws in the areas where you make your app available.