• 大小: 3.14MB
    文件类型: .zip
    金币: 2
    下载: 0 次
    发布日期: 2024-01-24
  • 语言: 其他
  • 标签: oaid  

资源简介

移动安全联盟统一SDK+使用demo(oaid_sdk_1.0.25.zip) ,移动安全联盟官方地址:http://www.msa-alliance.cn/ ,个人需要注册审核通过才能从官网下载SDK

资源截图

代码片段和文件信息

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(cxttruethis);
    }

     /*
    * 获取相应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);
    }

}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2020-12-14 14:36  oaid_sdk_1.0.25\
     文件        2370  2020-06-08 17:31  oaid_sdk_1.0.25\DemoHelper.java
     文件     1121912  2020-12-04 16:33  oaid_sdk_1.0.25\oaid_sdk_1.0.25.aar
     文件        2343  2020-12-04 16:54  oaid_sdk_1.0.25\release note.txt
     目录           0  2020-12-14 14:36  oaid_sdk_1.0.25\SDKDemo\
     文件         222  2020-12-14 11:30  oaid_sdk_1.0.25\SDKDemo\.gitignore
     目录           0  2020-12-14 14:36  oaid_sdk_1.0.25\SDKDemo\.gradle\
     目录           0  2020-12-14 14:36  oaid_sdk_1.0.25\SDKDemo\.gradle\5.6.4\
     目录           0  2020-12-14 14:36  oaid_sdk_1.0.25\SDKDemo\.gradle\5.6.4\executionHistory\
     文件      557380  2020-12-14 14:34  oaid_sdk_1.0.25\SDKDemo\.gradle\5.6.4\executionHistory\executionHistory.bin
     文件          17  2020-12-14 14:36  oaid_sdk_1.0.25\SDKDemo\.gradle\5.6.4\executionHistory\executionHistory.lock
     目录           0  2020-12-14 11:30  oaid_sdk_1.0.25\SDKDemo\.gradle\5.6.4\fileChanges\
     文件           1  2020-12-14 14:36  oaid_sdk_1.0.25\SDKDemo\.gradle\5.6.4\fileChanges\last-build.bin
     目录           0  2020-12-14 14:10  oaid_sdk_1.0.25\SDKDemo\.gradle\5.6.4\fileContent\
     文件          17  2020-12-14 14:34  oaid_sdk_1.0.25\SDKDemo\.gradle\5.6.4\fileContent\fileContent.lock
     目录           0  2020-12-14 14:36  oaid_sdk_1.0.25\SDKDemo\.gradle\5.6.4\fileHashes\
     文件       42797  2020-12-14 14:34  oaid_sdk_1.0.25\SDKDemo\.gradle\5.6.4\fileHashes\fileHashes.bin
     文件          17  2020-12-14 14:36  oaid_sdk_1.0.25\SDKDemo\.gradle\5.6.4\fileHashes\fileHashes.lock
     文件       18769  2020-12-14 14:30  oaid_sdk_1.0.25\SDKDemo\.gradle\5.6.4\fileHashes\resourceHashesCache.bin
     文件           0  2020-12-14 11:30  oaid_sdk_1.0.25\SDKDemo\.gradle\5.6.4\gc.properties
     目录           0  2020-12-14 14:36  oaid_sdk_1.0.25\SDKDemo\.gradle\5.6.4\javaCompile\
     文件      269752  2020-12-14 14:34  oaid_sdk_1.0.25\SDKDemo\.gradle\5.6.4\javaCompile\classAnalysis.bin
     文件       96421  2020-12-14 14:30  oaid_sdk_1.0.25\SDKDemo\.gradle\5.6.4\javaCompile\jarAnalysis.bin
     文件          17  2020-12-14 14:34  oaid_sdk_1.0.25\SDKDemo\.gradle\5.6.4\javaCompile\javaCompile.lock
     文件       26367  2020-12-14 14:34  oaid_sdk_1.0.25\SDKDemo\.gradle\5.6.4\javaCompile\taskHistory.bin
     目录           0  2020-12-14 11:30  oaid_sdk_1.0.25\SDKDemo\.gradle\5.6.4\vcsmetadata-1\
     目录           0  2020-12-14 14:36  oaid_sdk_1.0.25\SDKDemo\.gradle\buildOutputCleanup\
     文件          17  2020-12-14 14:36  oaid_sdk_1.0.25\SDKDemo\.gradle\buildOutputCleanup\buildOutputCleanup.lock
     文件          53  2020-12-14 11:30  oaid_sdk_1.0.25\SDKDemo\.gradle\buildOutputCleanup\cache.properties
     文件       59567  2020-12-14 14:34  oaid_sdk_1.0.25\SDKDemo\.gradle\buildOutputCleanup\outputFiles.bin
     目录           0  2020-12-14 11:30  oaid_sdk_1.0.25\SDKDemo\.gradle\vcs-1\
............此处省略116个文件信息

评论

共有 条评论

相关资源