GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - forever8361/AndroidDeviceId: 开源库-Android唯一设备号

BranchesTags
Open more actions menu

Latest commit

 

History

7 Commits
7 Commits

Folders and files

NameName
Last commit message
Last commit date
.idea
.idea
 
 
androiddeviceid
androiddeviceid
 
 
app
app
 
 
gradle/wrapper
gradle/wrapper
 
 
screenshot
screenshot
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
build.gradle
build.gradle
 
 
gradle.properties
gradle.properties
 
 
gradlew
gradlew
 
 
gradlew.bat
gradlew.bat
 
 
settings.gradle
settings.gradle
 
 

Repository files navigation

Android唯一设备号

方案一

具体做法

  • 生成UUID
  • 保存在APP中
  • 保存在SD卡中
  • APP和SD卡相互保存,防止用户卸载APP或者删除SD卡文件

代码部分截图

Screenshot

快速集成

1.添加依赖

在项目的build.gradle中,需要在allprojects最后添加jitpack

allprojects {
    repositories {
       ...

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

在APP的build.gradle中添加如下依赖,版本号以最新为准

    implementation 'com.github.zdf01082413:AndroidDeviceId:1.0'

2.直接使用

     // 1. path 如需要自己设置
     val Path = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_ALARMS).toString() + File.separator + "AndroidDeviceId"
     CustomDeviceId.init(this).setFilePath(Path).getCustomDeviceId

     // 2. path 也可不要,因有默认位置
     CustomDeviceId.init(this)getCustomDeviceId

注意

务必在使用前判断SD卡权限,否则会直接出错,库中没有做SD卡权限申请或判断。

About

开源库-Android唯一设备号

Resources

Readme
Activity

Stars

2 stars

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.