shuzilm-open-source / Get_Oaid_CNAdid

本项目整合了各大厂商获取 OAID 的原生方法
393 stars 67 forks source link

请问OAID的原生接口是从哪里获得的 #2

Open lucasfanfan opened 4 years ago

lucasfanfan commented 4 years ago

请问OAID的原生接口是从哪里获得的,可否提供一下出处。

liyujiang-gzu commented 4 years ago

看源代码里的这个,貌似像是反编译得来的?

public interface LenovoIDInterface extends IInterface {

  String a();

  String a(String arg1);

  String b();

  String b(String arg1);

  boolean c();

...

反编译了miit_mdid_sdk,里面的魅族OAID在魅族开放平台有只言片语,华为OAID对接的是华为的HUAWEI Ads SDK

package com.huawei.android.hms.pps;

import android.content.Context;
import android.support.annotation.Keep;

@Keep
public class AdvertisingIdClient {

    @Keep
    public static final class Info {
        @Keep
        private final String advertisingId;
        @Keep
        private final boolean limitAdTrackingEnabled;

        @Keep
        Info(String str, boolean z) {
            this.advertisingId = str;
            this.limitAdTrackingEnabled = z;
        }

        @Keep
        public final native String getId();

        @Keep
        public final native boolean isLimitAdTrackingEnabled();
    }

    @Keep
    public static native Info getAdvertisingIdInfo(Context context);

    @Keep
    private static native String getTag();
}