-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 8a6f626
Showing
43 changed files
with
1,017 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# Built application files | ||
*.apk | ||
*.ap_ | ||
*.aab | ||
|
||
# Files for the ART/Dalvik VM | ||
*.dex | ||
|
||
# Java class files | ||
*.class | ||
|
||
# Generated files | ||
bin/ | ||
gen/ | ||
out/ | ||
# Uncomment the following line in case you need and you don't have the release build type files in your app | ||
# release/ | ||
|
||
# Gradle files | ||
.gradle/ | ||
build/ | ||
|
||
# Local configuration file (sdk path, etc) | ||
local.properties | ||
|
||
# Proguard folder generated by Eclipse | ||
proguard/ | ||
|
||
# Log Files | ||
*.log | ||
|
||
# Android Studio Navigation editor temp files | ||
.navigation/ | ||
|
||
# Android Studio captures folder | ||
captures/ | ||
|
||
# IntelliJ | ||
*.iml | ||
.idea/workspace.xml | ||
.idea/tasks.xml | ||
.idea/gradle.xml | ||
.idea/assetWizardSettings.xml | ||
.idea/dictionaries | ||
.idea/libraries | ||
# Android Studio 3 in .gitignore file. | ||
.idea/caches | ||
.idea/modules.xml | ||
# Comment next line if keeping position of elements in Navigation Editor is relevant for you | ||
.idea/navEditor.xml | ||
|
||
# Keystore files | ||
# Uncomment the following lines if you do not want to check your keystore files in. | ||
#*.jks | ||
#*.keystore | ||
|
||
# External native build folder generated in Android Studio 2.2 and later | ||
.externalNativeBuild | ||
|
||
# Google Services (e.g. APIs or Firebase) | ||
# google-services.json | ||
|
||
# Freeline | ||
freeline.py | ||
freeline/ | ||
freeline_project_description.json | ||
|
||
# fastlane | ||
fastlane/report.xml | ||
fastlane/Preview.html | ||
fastlane/screenshots | ||
fastlane/test_output | ||
fastlane/readme.md | ||
|
||
# Version control | ||
vcs.xml | ||
|
||
# lint | ||
lint/intermediates/ | ||
lint/generated/ | ||
lint/outputs/ | ||
lint/tmp/ | ||
# lint/reports/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
package com.mdid.msa; | ||
|
||
import android.content.Context; | ||
import android.support.annotation.NonNull; | ||
import android.util.Log; | ||
|
||
import com.bun.miitmdid.core.ErrorCode; | ||
import com.bun.miitmdid.core.MdidSdkHelper; | ||
import com.bun.supplier.IIdentifierListener; | ||
import com.bun.supplier.IdSupplier; | ||
|
||
/** | ||
* Created by caict on 2020/6/8. | ||
*/ | ||
|
||
public class DemoHelper implements IIdentifierListener { | ||
|
||
private AppIdsUpdater _listener; | ||
public DemoHelper(AppIdsUpdater callback){ | ||
_listener=callback; | ||
|
||
} | ||
|
||
public void getDeviceIds(Context cxt){ | ||
|
||
long timeb=System.currentTimeMillis(); | ||
// 方法调用 | ||
int nres = CallFromReflect(cxt); | ||
|
||
long timee=System.currentTimeMillis(); | ||
long offset=timee-timeb; | ||
if(nres == ErrorCode.INIT_ERROR_DEVICE_NOSUPPORT){//不支持的设备 | ||
|
||
}else if( nres == ErrorCode.INIT_ERROR_LOAD_CONFIGFILE){//加载配置文件出错 | ||
|
||
}else if(nres == ErrorCode.INIT_ERROR_MANUFACTURER_NOSUPPORT){//不支持的设备厂商 | ||
|
||
}else if(nres == ErrorCode.INIT_ERROR_RESULT_DELAY){//获取接口是异步的,结果会在回调中返回,回调执行的回调可能在工作线程 | ||
|
||
}else if(nres == ErrorCode.INIT_HELPER_CALL_ERROR){//反射调用出错 | ||
|
||
} | ||
Log.d(getClass().getSimpleName(),"return value: "+String.valueOf(nres)); | ||
|
||
} | ||
|
||
/* | ||
* 方法调用 | ||
* | ||
* */ | ||
private int CallFromReflect(Context cxt){ | ||
return MdidSdkHelper.InitSdk(cxt,true,this); | ||
} | ||
|
||
/* | ||
* 获取相应id | ||
* | ||
* */ | ||
@Override | ||
public void OnSupport(boolean isSupport, IdSupplier _supplier) { | ||
if(_supplier==null) { | ||
return; | ||
} | ||
String oaid=_supplier.getOAID(); | ||
String vaid=_supplier.getVAID(); | ||
String aaid=_supplier.getAAID(); | ||
StringBuilder builder=new StringBuilder(); | ||
builder.append("support: ").append(isSupport?"true":"false").append("\n"); | ||
builder.append("OAID: ").append(oaid).append("\n"); | ||
builder.append("VAID: ").append(vaid).append("\n"); | ||
builder.append("AAID: ").append(aaid).append("\n"); | ||
String idstext=builder.toString(); | ||
if(_listener!=null){ | ||
_listener.OnIdsAvalid(idstext); | ||
} | ||
} | ||
|
||
public interface AppIdsUpdater{ | ||
void OnIdsAvalid(@NonNull String ids); | ||
} | ||
|
||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
2019年8月6日 miit_mdid_sdk_v1.0.5 | ||
1、去掉所有非必需数据的采集; | ||
2、兼容AndroidX; | ||
3、修改小米部分手机上取udid的问题; | ||
4、更新OPPO接口调用; | ||
5、增加联想接口支持; | ||
6、优化SDK包体积。 | ||
|
||
2019年8月16日 miit_mdid_sdk_v1.0.6 | ||
1、去掉所有非必需数据的采集; | ||
2、兼容AndroidX; | ||
3、修改小米部分手机上取udid的问题; | ||
4、更新OPPO接口调用; | ||
5、增加联想接口支持; | ||
6、优化SDK包体积; | ||
7、支持armeabi。 | ||
|
||
2019年8月28日 miit_mdid_sdk_v1.0.8 | ||
1、增加华硕接口支持; | ||
2、解决动态加载和插件化; | ||
3、优化代码,支持反射调用; | ||
4、解决android9以上找不到方法的问题; | ||
5、更新说明文档。 | ||
|
||
2019年9月18日 miit_mdid_sdk_v1.0.9 | ||
1、解决部分APP、机型崩溃问题; | ||
2、增加了部分使用建议和F&Q。 | ||
|
||
|
||
vertion 1.0.10 2019-10-14 | ||
1.支持三星,魅族,nubia手机设备 | ||
2.更新华硕,vivo 支持代码。 | ||
3.调整AsyncTask使用并行线程池,改进性能。 | ||
4.调整输出异常为输出调试信息,避免开发者疑问 | ||
5.vivo改为异步,改进性能 | ||
6.修改加固内联定义,解决崩溃 | ||
7.不再提供udid接口。 | ||
|
||
version 1.0.11 2019-12-02 | ||
1.修复三星,联想在不支持的手机上不回调的bug | ||
2.修复webview依赖导致的问题 | ||
3.初始化过程中,出现任何问题都会走回调 | ||
4.sdk里做初始化检查,避免重复初始化 | ||
5.vivo 9.0以下不调用获取oaid | ||
6.去掉默认aaid的生成 | ||
7.修改华为空指针的bug | ||
|
||
verstion 1.0.13 2020-02-04 | ||
1.调整sdk包架构,支持系统级接入,目前只在部分手机上支持,开发者不用更新sdk,即可享受sdk的升级。 | ||
2.支持freemeos,ssuios,致濮os | ||
3.支持一加和黑鲨手机 | ||
4.sdk android sdk提升到28 | ||
5.修复vivo,oppo在低版本不支持的手机上引起的崩溃 | ||
6.部分类不加固,修复部分手机的加固崩溃问题 | ||
|
||
version 1.0.22 2020-07-10 | ||
1.为解决之前加固引起的问题,更新加固方式 | ||
2.去除不必要的信息收集问题 | ||
3.更新部分厂家的接口方式 | ||
|
||
version 1.0.23 2020-09-07 | ||
1.修改OPPO获取接口 | ||
2.更新混淆字典 | ||
3.修改已知加固方案产生的bug | ||
|
||
vertion 1.0.25 2020-12-04 | ||
1.修复特定情况下会出现“检测到试用版运行”的bug; | ||
2.解决了联想反射找不到类的问题。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"supplier":{ | ||
"vivo":{ | ||
"appid":"100215079" | ||
}, | ||
"xiaomi":{ | ||
|
||
}, | ||
"huawei":{ | ||
|
||
}, | ||
"oppo":{ | ||
|
||
} | ||
} | ||
|
||
} |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# OAID 查看器 | ||
接入 OAID SDK 的 Demo 工程 | ||
*** | ||
- [release](./Releases) 提供 APK 下载 | ||
|
||
- 支持设备见 [说明文档](./Doc/移动智能终端补充设备标识体系统一调用SDK开发者说明文档v1.0.25.pdf) | ||
|
||
- 常见问题见 [F&Q文档](./Doc/移动智能终端补充设备标识体系统一调用SDK%20F&Qv2.4.pdf) | ||
|
||
- 效果图 | ||
![效果图](./imgs/1.jpg) | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
plugins { | ||
id 'com.android.application' | ||
id 'kotlin-android' | ||
} | ||
|
||
android { | ||
compileSdkVersion 30 | ||
buildToolsVersion "30.0.3" | ||
|
||
defaultConfig { | ||
applicationId "com.mai.oaidviewer" | ||
minSdkVersion 21 | ||
targetSdkVersion 30 | ||
versionCode 1 | ||
versionName "1.0" | ||
|
||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | ||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_8 | ||
targetCompatibility JavaVersion.VERSION_1_8 | ||
} | ||
kotlinOptions { | ||
jvmTarget = '1.8' | ||
} | ||
buildFeatures.viewBinding = true | ||
} | ||
|
||
dependencies { | ||
implementation fileTree('libs/oaid_sdk_1.0.25.aar') | ||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" | ||
implementation 'androidx.core:core-ktx:1.2.0' | ||
implementation 'androidx.appcompat:appcompat:1.2.0' | ||
implementation 'com.google.android.material:material:1.2.1' | ||
implementation 'androidx.constraintlayout:constraintlayout:2.0.4' | ||
testImplementation 'junit:junit:4.+' | ||
androidTestImplementation 'androidx.test.ext:junit:1.1.2' | ||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Add project specific ProGuard rules here. | ||
# You can control the set of applied configuration files using the | ||
# proguardFiles setting in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.mai.oaidviewer"> | ||
|
||
<application | ||
android:allowBackup="true" | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="@string/app_name" | ||
android:roundIcon="@mipmap/ic_launcher_round" | ||
android:supportsRtl="true" | ||
android:theme="@style/Theme.OAIDViewer"> | ||
<activity android:name=".MainActivity"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
</application> | ||
|
||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"supplier":{ | ||
"vivo":{ | ||
"appid":"100215079" | ||
}, | ||
"xiaomi":{ | ||
|
||
}, | ||
"huawei":{ | ||
|
||
}, | ||
"oppo":{ | ||
|
||
} | ||
} | ||
|
||
} |
Oops, something went wrong.