Przeglądaj źródła

功能开发:删除第三方广告

Sora 1 rok temu
rodzic
commit
f5d43763ed

+ 0 - 50
app/build.gradle

@@ -218,11 +218,6 @@ dependencies {
     implementation 'com.tencent.bugly:crashreport_upgrade:1.3.5'
     implementation(name: 'alipaySdk-15.5.9', ext: 'aar')
     implementation(name: 'ad_dk_sdk', ext: 'aar')
-    implementation(name: 'klevinSDK_2.0.0.21', ext: 'aar')
-    implementation(name: 'lygamewrapper-sheep-release', ext: 'aar') {
-        exclude group: 'com.google.android', module: 'exoplayer2'
-    }
-
     //其中latest.release指代最新版本号,也可以指定明确的版本号,例如1.2.0
     implementation 'com.tencent.bugly:nativecrashreport:3.3.1'
 
@@ -245,59 +240,21 @@ dependencies {
     //不要修改这里,相信我
     releaseImplementation 'androidx.multidex:multidex:2.0.0'
     implementation(name: 'com.kfzs.safe-202403062150', ext: 'aar')
-
-    //butterknife
-//    implementation('com.jakewharton:butterknife:8.8.1') {
-//////        exclude group: 'com.android.support', module: 'support-annotations'
-//////        exclude group: 'com.android.support', module: 'support-compat'
-//////        exclude group: 'com.jakewharton', module: 'butterknife-annotations'
-////    }
-////    annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
-
     implementation 'com.jakewharton:butterknife:10.0.0'
     annotationProcessor 'com.jakewharton:butterknife-compiler:10.0.0'
-
-    //dagger2
-
-    //    implementation 'com.google.dagger:dagger:+'
-
-    //    implementation 'com.google.dagger:dagger-compiler:+'
     compileOnly 'org.glassfish:javax.annotation:10.0-b28'
-
-    //javax.annotation', module: 'jsr250-api
     implementation 'com.google.dagger:dagger:2.12'
-
-    //javax.inject', module: 'javax.inject
     annotationProcessor 'com.google.dagger:dagger-compiler:2.12'
-
-    //retrofit
     implementation('com.squareup.retrofit2:retrofit:2.4.0') {
         exclude group: 'com.google.android', module: 'android'
         exclude group: 'com.squareup.okhttp3', module: 'okhttp'
         exclude group: 'org.codehaus.mojo', module: 'animal-sniffer-annotations'
     }
-
-    //不知道接进来干嘛的,与当前的oaid冲突
-    //implementation(name: 'msa_mdid_1.0.13', ext: 'aar')
     implementation(name: 'oaid_sdk_1.0.25', ext: 'aar')
-
-    implementation(name: 'JasmineSDK_v1.2.5', ext: 'aar')
-
-    //    implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
     implementation('org.ligboy.retrofit2:converter-fastjson-android:2.1.0') {
         exclude group: 'com.alibaba', module: 'fastjson'
         exclude group: 'com.squareup.retrofit2', module: 'retrofit'
     }
-
-    //    implementation 'com.squareup.okhttp3:logging-interceptor:3.10.0'
-
-    //    implementation 'com.squareup.retrofit2:adapter-rxjava2:+'
-
-    //    implementation ('com.squareup.retrofit2:adapter-rxjava:2.1.0') {
-
-    //        exclude group: 'com.squareup.retrofit2', module: 'retrofit'
-
-    //    }
     implementation('com.squareup.retrofit2:adapter-rxjava2:2.5.0') {
         exclude group: 'com.squareup.retrofit2', module: 'retrofit'
         exclude group: 'io.reactivex.rxjava2', module: 'rxjava'
@@ -311,15 +268,8 @@ dependencies {
 
     //获取动态权限三方库
     implementation('pub.devrel:easypermissions:1.2.0') {
-//        exclude group: 'com.android.support', module: 'appcompat-v7'
-//        exclude group: 'com.android.support', module: 'support-compat'
-//        exclude group: 'com.android.support', module: 'support-fragment'
     }
 
-    //    implementation 'net.danlew:android.joda:2.9.3'
-
-    //    implementation 'com.orhanobut:logger:1.15'
-
     //友盟
     implementation 'com.umeng.sdk:common:1.5.3'
 

BIN
app/libs/JasmineSDK_v1.2.5.aar


BIN
app/libs/klevinSDK_2.0.0.21.aar


BIN
app/libs/lygamewrapper-sheep-release.aar


+ 0 - 87
app/src/main/java/com/sheep/jiuyan/samllsheep/SheepApp.java

@@ -24,18 +24,13 @@ import com.baidu.location.LocationClient;
 import com.baidu.location.LocationClientOption;
 import com.bumptech.glide.Glide;
 import com.danikula.videocache.HttpProxyCacheServer;
-import com.jasmine.cantaloupe.engine.JasmineEngine;
-import com.jasmine.cantaloupe.utils.LogUtils2;
 import com.kfzs.cfyl.share_library.util.ContextHolder;
 import com.liulishuo.okdownload.OkDownload;
 import com.liulishuo.okdownload.core.dispatcher.DownloadDispatcher;
-import com.lygame.wrapper.sdk.LySdk;
-import com.lygame.wrapper.strategy.DefaultStrategy;
 import com.sheep.gamegroup.di.components.DaggerNetComponent;
 import com.sheep.gamegroup.di.components.NetComponent;
 import com.sheep.gamegroup.di.modules.NetModule;
 import com.sheep.gamegroup.model.entity.BaseMessage;
-import com.sheep.gamegroup.model.entity.ThirdAdsConfigEntity;
 import com.sheep.gamegroup.model.entity.WebProcessConfigEntity;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.module.login.AccountConsistenceAct;
@@ -81,9 +76,6 @@ import com.stmsdk.AbsTMSConfig;
 import com.stmsdk.TMSDKContext;
 import com.tencent.bugly.Bugly;
 import com.tencent.bugly.beta.Beta;
-import com.tencent.klevin.KlevinConfig;
-import com.tencent.klevin.KlevinManager;
-import com.tencent.klevin.listener.InitializationListener;
 import com.tencent.mm.opensdk.openapi.IWXAPI;
 import com.tencent.mm.opensdk.openapi.WXAPIFactory;
 import com.tencent.qqmini.minigame.opensdk.OpenSdkLoginManager;
@@ -222,27 +214,6 @@ public class SheepApp extends MultiDexApplication {
             }
         });
 
-        SheepApp.getInstance().getNetComponent()
-                .getApiService()
-                .commonConfig("third_ad")
-                .subscribeOn(Schedulers.io())
-                .observeOn(AndroidSchedulers.mainThread())
-                .subscribe(new SheepSubscriber<BaseMessage>(this) {
-                    @Override
-                    public void onError(BaseMessage baseMessage) {
-                        if (BuildConfig.DEBUG)
-                            G.showToast("获取三方广告配置失败" + baseMessage.getMsg());
-                    }
-
-                    @Override
-                    public void onNext(BaseMessage baseMessage) {
-                        ThirdAdsConfigEntity thirdAdsConfigEntity = baseMessage.getData(ThirdAdsConfigEntity.class);
-                        initYKYAd(thirdAdsConfigEntity.getYkyConfig().getAppid());
-                        initYTAd(thirdAdsConfigEntity.getYtConfig().getAppid(), thirdAdsConfigEntity.getYtConfig().getAd_id());
-                        initZKAd();
-                    }
-                });
-
         SheepApp.getInstance().getNetComponent().getApiService().commonConfig("should_open_in_new_process")
                 .subscribeOn(Schedulers.io())
                 .observeOn(AndroidSchedulers.mainThread())
@@ -261,64 +232,6 @@ public class SheepApp extends MultiDexApplication {
 
     }
 
-    //初始化游可盈广告
-    private void initYKYAd(String appId) {
-        KlevinConfig.Builder builder = new KlevinConfig.Builder()
-                .appId(appId) //【必须】AppId,AndroidManifest.xml 中配置后可不调用
-                .debugMode(true) //打开调试日志,上线前关闭,【可选】
-                .networkType(KlevinConfig.NETWORK_NOTLIMIT);//可下载的网络,【可选】
-
-        KlevinManager.init(this, builder.build(), new InitializationListener() {
-            @Override
-            public void onSuccess() {
-                if (BuildConfig.DEBUG)
-                    G.showToast("游可赢广告初始化:init onSuccess ");
-            }
-
-            @Override
-            public void onError(int i, String s) {
-                if (BuildConfig.DEBUG)
-                    G.showToast("游可赢广告初始化:init onFail : " + i + ":  " + s);
-                //code:KLAdEvent_InitError = 801; // 宿主初始化错误
-            }
-
-            @Override
-            public void onIdentifier(boolean support, String oaid) {
-
-                // support 为 true 时,oaid 返回设备的 oaid。false 时返回为空或错误码
-                /*if (support) {
-                    Log.i(TAG, "oaid=" + oaid);
-                } else {
-                    Log.e(TAG, "not support oaid");
-                }*/
-            }
-        });
-    }
-
-    //初始化优投广告
-    private void initYTAd(String appId, String adId) {
-        JasmineEngine.getInstance(this).init(
-                appId,
-                Integer.parseInt(adId),
-                new JasmineEngine.InitCallBack() {
-                    @Override
-                    public void initSuccess() {
-                        LogUtils2.info("initSuccess");
-                    }
-
-                    @Override
-                    public void initFailed(String err) {
-                        LogUtils2.info("initFailed:" + err);
-                    }
-                });
-    }
-
-    //初始化掌酷广告
-    private void initZKAd() {
-        //sdk策略配置
-        DefaultStrategy defaultStrategy = new DefaultStrategy(this);
-        LySdk.setSdkStrategy(defaultStrategy);
-    }
 
     /**
      * https://bugly.qq.com/v2/crash-reporting/crashes/0dd998212c/21541?pid=1