# android-uniDevId **Repository Path**: apacherio/android-uniDevId ## Basic Information - **Project Name**: android-uniDevId - **Description**: 旧API用OpenUDID,新API用MediaDrm生成硬件绑定ID;失败时生成随机UUID存储到SharedPreferences。无需敏感权限(仅用系统API和本地存储)。兼容新旧 Android 版本:旧 API 使用 OpenUDID,新 API 使用 MediaDrm 生成硬件绑定 ID。兜底策略:生成随机 UUID 并存储到 SharedPreferences(应用卸载后失效) - **Primary Language**: Java - **License**: MulanPSL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-07-31 - **Last Updated**: 2025-07-31 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # android-uniDevId Android Iniversal Device ID Library - Use OpenUDID_manager for old API and MediaDrm for new API - If both options return an empty string, then a random UUID is generated and saved in Preferences until the application is reinstalled ### Installation - First add this repo to your project:```mavenCentral()``` - Second add this dependency to your module build.gradle: ```implementation 'io.github.beeline09.android-uniDevId:uniDevId:1.0.3'``` ### Usage Before get Device ID we need to init lib by command: ```UdidManager.init(this)```. It is highly recommended to do this in `onCreate` method of Application class For get Device UUID in any place of your app, you need to call: `UdidManager.getUUID()`