ijkerme / AndroidID

Get a unique ID for Android devices without any permissions.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AndroidID

Java and Kotlin Android library. Uniquely identify an Android device without any permissions and API restrictions. The recommended approach using DRM API.

Implementation

Gradle:

Add it in your root build.gradle at the end of repositories:

Step 1. Add the JitPack repository to your build file

allprojects {
  repositories {
    ...
    maven { url 'https://jitpack.io' }
    }
}

Step 2. Add the dependency

dependencies {
    implementation 'com.github.devEyosiyas:AndroidID:1.0.2'
}

Or Maven:

<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
  
<dependency>groupId>com.github.devEyosiyas</groupId>
<artifactId>AndroidID</artifactId>
<version>1.0.2</version>
</dependency>

How do I use Android ID?

Java

  String widevine = JavaAndroidID.widevine; // The most reliable way
  String commonPSSH = JavaAndroidID.commonPSSH;
  String clearKey = JavaAndroidID.clearKey;
  String playReady = JavaAndroidID.playReady;

Kotlin

  val id = KotlinAndroidID()
  val widevine: String = id.widevine() // The most reliable way
  val commonPSSH: String = id.commonPSSH()
  val clearKey: String = id.clearKey()
  val playReady: String = id.playReady()

Author

Eyosiyas Bereketab - @devEyosiyas on GitHub, and @devEyosi on Twitter

About

Get a unique ID for Android devices without any permissions.

License:MIT License


Languages

Language:Java 51.5%Language:Kotlin 48.5%