Buscar pacotes, repositórios e categorias de apps

Detalhes do pacotev0.4.0

unique_identifier

Um novo plugin Flutter para buscar o identificador exclusivo do Android e iOS.

AndroidiOS
Downloads em 30 dias
13,2 mil
Curtidas
58
Pontos Pub
140

Instalar pacote

flutter pub add unique_identifier

Visão geral do pacote

Orientação gerada a partir de informações públicas. Apenas para referência.

O pacote unique_identifier é um plugin Flutter que fornece uma maneira simples de obter um identificador exclusivo do dispositivo em plataformas Android e iOS. Ele utiliza APIs nativas para garantir uma identificação confiável e segura, sendo útil para rastreamento, licenciamento ou autenticação de usuários. O plugin foi projetado para ser leve e fácil de integrar, com configuração mínima necessária. Respeita as diretrizes de privacidade específicas de cada plataforma e não coleta dados desnecessários. Este pacote é ideal para desenvolvedores que buscam identificação consistente de dispositivos entre plataformas sem gerenciar diretamente o código nativo.

Casos de uso

  • Rastreamento de dispositivos
  • Licenciamento de aplicativos
  • Autenticação de usuário
  • Analytics
  • Gerenciamento de sessão

Principais recursos

  • Suporte multiplataforma (Android e iOS)
  • Integração simples da API
  • Respeita as diretrizes de privacidade
  • Nenhuma permissão adicional necessária
  • Geração de identificador seguro

Indicado para

  • Desenvolvedores de aplicativos móveis
  • Sistemas de autenticação
  • Soluções de licenciamento
  • Implementações de análise
  • Aplicativos conscientes de privacidade

Considerações

  • O identificador pode mudar após a reinstalação do aplicativo
  • Não adequado para criptografia de alta segurança
  • Depende da implementação específica da plataforma
  • Pode exigir consentimento do usuário em algumas regiões
  • Limitado à unicidade no nível do dispositivo

README original

Snapshot do README original do repositório-fonte vinculado. Consulte o repositório para o conteúdo mais recente.

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.

Categorias

Dependências

Lista de dependências 1 itens

  • plugin_platform_interface^2.0.2

Repositório-fonte

Projetos que usam este pacote

Ainda não há dados.