You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
宏谋刘 161d9c18f3 1.0 10 months ago
android 1.0 10 months ago
example 1.0 10 months ago
ios 1.0 10 months ago
lib 1.0 10 months ago
test 1.0 10 months ago
CHANGELOG.md 1.0 10 months ago
LICENSE 1.0 10 months ago
README.md 1.0 10 months ago
analysis_options.yaml 1.0 10 months ago
device_identity.iml 1.0 10 months ago
pubspec.yaml 1.0 10 months ago

README.md

device_identity

用于获取设备标识的插件androidId、Imei、oaid等

安装

device_identity: latestVersion

使用

只能在Andoird平台调用插件已经对平台做了条件判断

  • 同意协议后调用

await DeviceIdentity.register();

  • 获取安卓ID可能为空

String androidId = await DeviceIdentity.androidId;

  • 获取IMEI只支持Android 10之前的系统需要READ_PHONE_STATE权限可能为空

String imei = await DeviceIdentity.imei;

  • 获取OAID/AAID

String oaid = await DeviceIdentity.oaid;

  • 获取UA

String ua = await DeviceIdentity.ua;

注意

  1. 在 android/app/build.gradle 中将 minSdkVersion 设置为 19或大于19

后续计划

  • iOS端idfa的获取

感谢

Android_CN_OAID提供的SDK