imei_plugin
在執行時間驗證權限後,取得 Android 設備的真實 IMEI,並在 iOS 上取得唯一 ID。一個字母數字字串,可唯一識別設備給應用程式的供應商。
用於在 Flutter 中取得 Android IMEI 的外掛程式
{"sdk":"flutter"}以下為英文專案原文快照,最新內容請造訪 GitHub。
Get unique id device on ios and android
Get IMEI (International Mobile Device Identity) for Android devices less than android 10 with runtime permission for android greater than or equal to 10 returns a UUID and get unique identification on ios An alphanumeric string that uniquely identifies a device for the application provider.
Use
import 'package:imei_plugin/imei_plugin.dart';
String imei = await ImeiPlugin.getImei();
List<String> multiImei = await ImeiPlugin.getImeiMulti(); //for double-triple SIM phones
String uuid = await ImeiPlugin.getId();
if you want to always request permission even if the user has already denied it. You can disable validation shouldShowRequestPermissionRationale set value in false
String platformImei = await ImeiPlugin
.getImei( shouldShowRequestPermissionRationale: false );
default value is false.
New param shouldShowRequestPermissionRationale only Android
getId only android. id generated with UUID.randomUUID()
getImeiMulti support for double-triple SIM phones
| OS |
|---|
| Android |
| IOS |
MIT
This plugin is developed, Free Software, by Kevin Caicedo