패키지, 저장소 및 앱 카테고리 검색

패키지 상세v0.4.0

unique_identifier

안드로이드 및 iOS에서 고유 식별자를 가져오기 위한 새로운 플러터 플러그인입니다.

AndroidiOS
30일 다운로드
1.3만
좋아요
58
Pub 점수
140

패키지 설치

flutter pub add unique_identifier

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

unique_identifier 패키지는 Android 및 iOS 플랫폼에서 고유한 디바이스 식별자를 검색하는 간단한 방법을 제공하는 Flutter 플러그인입니다. 신뢰할 수 있고 안전한 식별을 보장하기 위해 네이티브 API를 활용하며, 추적, 라이선싱 또는 사용자 인증 목적에 유용합니다. 이 플러그인은 가볍고 통합이 쉬우며 최소한의 설정만 필요합니다. 플랫폼별 개인정보 보호 지침을 존중하며 불필요한 데이터를 수집하지 않습니다. 개발자가 직접 네이티브 코드를 관리하지 않고도 플랫폼 간 일관된 디바이스 식별을 원하는 경우에 이상적입니다.

사용 사례

  • 장치 추적
  • 앱 라이선스
  • 사용자 인증
  • Analytics
  • 세션 관리

주요 기능

  • 크로스 플랫폼 지원 (Android 및 iOS)
  • 간단한 API 통합
  • 개인정보 지침을 존중합니다
  • 추가 권한이 필요하지 않습니다
  • 보안 식별자 생성

적합한 대상

  • 모바일 앱 개발자
  • 인증 시스템
  • 라이선스 솔루션
  • 분석 구현
  • 개인정보 보호에 신경 쓰는 앱

고려 사항

  • 앱 재설치 후 식별자가 변경될 수 있습니다
  • 고보안 암호화에 적합하지 않습니다
  • 플랫폼에 특화된 구현에 따라 다름
  • 일부 지역에서는 사용자 동의가 필요할 수 있습니다
  • 장치 수준의 고유성에 제한됨

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

Unique Identifier

pub package

A Flutter plugin to get the ANDROID_ID for android and identifierForVendor for iOS platforms.

Installing

dependencies:
  unique_identifier: ^0.4.0
Import
import 'package:unique_identifier/unique_identifier.dart';

How To Use

 dart String _identifier = 'Unknown';
  
 @override
 void initState() {
   super.initState();
   initUniqueIdentifierState();
 }

 Future<void> initUniqueIdentifierState() async {
   String identifier;
   try {
     identifier = await UniqueIdentifier.serial;
   } on PlatformException {
     identifier = 'Failed to get Unique Identifier';
   }

   if (!mounted) return;

   setState(() {
     _identifier = identifier;
   });
 }

 @override
 Widget build(BuildContext context) {
   return new MaterialApp(
     home: new Scaffold(
       appBar: new AppBar(
         title: const Text('Plugin example app'),
       ),
       body: new Center(
         child: new Text('Running on device with id: $_identifier\n'),
       ),
     ),
   );
 }

Bugs & Requests

If you encounter any bugs feel free to open an issue. Raise a ticket on github for suggestions. Pull request are also welcome.

Flutter

For help getting started with Flutter, view our online documentation.

For help on editing plugin code, view the documentation.

License

MIT License

NOTE

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. Values of ANDROID_ID are scoped by signing key and user. The value may change if a factory reset is performed on the device or if an APK signing key changes. For more information about how the platform handles ANDROID_ID in Android 8.0 (API level 26) and higher, see Android 8.0 Behavior Changes. Note: For apps that were installed prior to updating the device to a version of Android 8.0 (API level 26) or higher, the value of ANDROID_ID changes if the app is uninstalled and then reinstalled after the OTA. To preserve values across uninstalls after an OTA to Android 8.0 or higher, developers can use Key/Value Backup. In versions of the platform lower than Android 8.0 (API level 26), a 64-bit number (expressed as a hexadecimal string) that is randomly generated when the user first sets up the device and should remain constant for the lifetime of the user's device. On devices that have multiple users, each user appears as a completely separate device, so the ANDROID_ID value is unique to each user. Note: If the caller is an Instant App the ID is scoped to the Instant App, it is generated when the Instant App is first installed and reset if the user clears the Instant App.

카테고리

의존성

의존성 목록 1 개

  • plugin_platform_interface^2.0.2

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.