diff --git a/app/build.gradle b/app/build.gradle index f374557..5cc5421 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -141,7 +141,7 @@ repositories { dependencies { implementation fileTree(dir: 'libs', include: ['*.aar']) - implementation fileTree(include: ['*.jar'], dir: 'libs') + implementation fileTree(dir: 'libs', include: ['*.jar']) implementation project(path: ':DialogX') testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test.ext:junit:1.1.1' @@ -222,11 +222,6 @@ dependencies { implementation 'com.liulishuo.filedownloader:library:1.7.7' - // 如使用视频广告必须依赖,否则会导致视频播放崩溃 - implementation 'tv.danmaku.ijk.media:ijkplayer-java:0.8.8' - implementation 'tv.danmaku.ijk.media:ijkplayer-armv7a:0.8.8' - implementation 'tv.danmaku.ijk.media:ijkplayer-exo:0.8.8' - //SwipeBackLayout implementation 'me.imid.swipebacklayout.lib:library:1.1.0' diff --git a/app/libs/ddsdk_4.1.6_custom_2021-04-09_0948.aar b/app/libs/ddsdk_4.1.6_custom_2021-04-09_0948.aar deleted file mode 100644 index 235a9b7..0000000 Binary files a/app/libs/ddsdk_4.1.6_custom_2021-04-09_0948.aar and /dev/null differ diff --git a/app/libs/mintegral_appwall.aar b/app/libs/mintegral_appwall.aar deleted file mode 100644 index e80c68b..0000000 Binary files a/app/libs/mintegral_appwall.aar and /dev/null differ diff --git a/app/libs/mintegral_appwallext.aar b/app/libs/mintegral_appwallext.aar deleted file mode 100644 index d546ea5..0000000 Binary files a/app/libs/mintegral_appwallext.aar and /dev/null differ diff --git a/app/libs/mintegral_chinacommon.aar b/app/libs/mintegral_chinacommon.aar deleted file mode 100644 index 1adb3e7..0000000 Binary files a/app/libs/mintegral_chinacommon.aar and /dev/null differ diff --git a/app/libs/mintegral_interactiveads.aar b/app/libs/mintegral_interactiveads.aar deleted file mode 100644 index a48a54d..0000000 Binary files a/app/libs/mintegral_interactiveads.aar and /dev/null differ diff --git a/app/libs/mintegral_interstitial.aar b/app/libs/mintegral_interstitial.aar deleted file mode 100644 index b212d5e..0000000 Binary files a/app/libs/mintegral_interstitial.aar and /dev/null differ diff --git a/app/libs/mintegral_interstitialvideo.aar b/app/libs/mintegral_interstitialvideo.aar deleted file mode 100644 index aa54ec3..0000000 Binary files a/app/libs/mintegral_interstitialvideo.aar and /dev/null differ diff --git a/app/libs/mintegral_mtgbanner.aar b/app/libs/mintegral_mtgbanner.aar deleted file mode 100644 index de0a3b7..0000000 Binary files a/app/libs/mintegral_mtgbanner.aar and /dev/null differ diff --git a/app/libs/mintegral_mtgbid.aar b/app/libs/mintegral_mtgbid.aar deleted file mode 100644 index 3568dbf..0000000 Binary files a/app/libs/mintegral_mtgbid.aar and /dev/null differ diff --git a/app/libs/mintegral_mtgdownloads.aar b/app/libs/mintegral_mtgdownloads.aar deleted file mode 100644 index 094a0e2..0000000 Binary files a/app/libs/mintegral_mtgdownloads.aar and /dev/null differ diff --git a/app/libs/mintegral_mtgjscommon.aar b/app/libs/mintegral_mtgjscommon.aar deleted file mode 100644 index 9c5d75b..0000000 Binary files a/app/libs/mintegral_mtgjscommon.aar and /dev/null differ diff --git a/app/libs/mintegral_mtgnative.aar b/app/libs/mintegral_mtgnative.aar deleted file mode 100644 index 894d028..0000000 Binary files a/app/libs/mintegral_mtgnative.aar and /dev/null differ diff --git a/app/libs/mintegral_mtgnativeadvanced.aar b/app/libs/mintegral_mtgnativeadvanced.aar deleted file mode 100644 index 52c9c86..0000000 Binary files a/app/libs/mintegral_mtgnativeadvanced.aar and /dev/null differ diff --git a/app/libs/mintegral_mtgsplash.aar b/app/libs/mintegral_mtgsplash.aar deleted file mode 100644 index 7912ff3..0000000 Binary files a/app/libs/mintegral_mtgsplash.aar and /dev/null differ diff --git a/app/libs/mintegral_nativeex.aar b/app/libs/mintegral_nativeex.aar deleted file mode 100644 index 1425bf5..0000000 Binary files a/app/libs/mintegral_nativeex.aar and /dev/null differ diff --git a/app/libs/mintegral_playercommon.aar b/app/libs/mintegral_playercommon.aar deleted file mode 100644 index b72af76..0000000 Binary files a/app/libs/mintegral_playercommon.aar and /dev/null differ diff --git a/app/libs/mintegral_reward.aar b/app/libs/mintegral_reward.aar deleted file mode 100644 index 22574d9..0000000 Binary files a/app/libs/mintegral_reward.aar and /dev/null differ diff --git a/app/libs/mintegral_videocommon.aar b/app/libs/mintegral_videocommon.aar deleted file mode 100644 index ebe963d..0000000 Binary files a/app/libs/mintegral_videocommon.aar and /dev/null differ diff --git a/app/libs/mintegral_videojs.aar b/app/libs/mintegral_videojs.aar deleted file mode 100644 index 3f19f98..0000000 Binary files a/app/libs/mintegral_videojs.aar and /dev/null differ diff --git a/app/libs/windAd-2.25.2.aar b/app/libs/windAd-2.25.2.aar deleted file mode 100644 index 9a71d84..0000000 Binary files a/app/libs/windAd-2.25.2.aar and /dev/null differ diff --git a/app/src/main/java/xyz/fycz/myreader/ui/activity/BookDetailedActivity.java b/app/src/main/java/xyz/fycz/myreader/ui/activity/BookDetailedActivity.java index 97cf2b5..d8bbce5 100644 --- a/app/src/main/java/xyz/fycz/myreader/ui/activity/BookDetailedActivity.java +++ b/app/src/main/java/xyz/fycz/myreader/ui/activity/BookDetailedActivity.java @@ -2,18 +2,12 @@ package xyz.fycz.myreader.ui.activity; import android.annotation.SuppressLint; import android.content.Intent; -import android.graphics.Bitmap; -import android.graphics.BitmapFactory; -import android.graphics.Canvas; -import android.graphics.Color; import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Bundle; import android.os.Handler; import android.os.Message; -import android.text.TextPaint; import android.text.TextUtils; -import android.util.Log; import android.view.Menu; import android.view.MenuItem; import android.view.View; @@ -24,23 +18,14 @@ import androidx.recyclerview.widget.LinearLayoutManager; import com.bumptech.glide.Glide; import com.bumptech.glide.RequestBuilder; import com.bumptech.glide.request.RequestOptions; -import com.google.zxing.EncodeHintType; -import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; -import com.weaction.ddsdk.ad.DdSdkFlowAd; import org.jetbrains.annotations.NotNull; -import java.io.File; -import java.io.FileOutputStream; import java.util.ArrayList; import java.util.List; -import cn.bingoogolapple.qrcode.zxing.QRCodeEncoder; import io.reactivex.Observable; import io.reactivex.ObservableSource; -import io.reactivex.Single; -import io.reactivex.SingleOnSubscribe; -import io.reactivex.annotations.NonNull; import io.reactivex.disposables.Disposable; import io.reactivex.functions.Function; import xyz.fycz.myreader.R; @@ -49,11 +34,8 @@ import xyz.fycz.myreader.application.SysManager; import xyz.fycz.myreader.base.BaseActivity; import xyz.fycz.myreader.base.BitIntentDataManager; import xyz.fycz.myreader.base.observer.MyObserver; -import xyz.fycz.myreader.base.observer.MySingleObserver; import xyz.fycz.myreader.common.APPCONST; -import xyz.fycz.myreader.common.URLCONST; import xyz.fycz.myreader.databinding.ActivityBookDetailBinding; -import xyz.fycz.myreader.entity.SharedBook; import xyz.fycz.myreader.greendao.entity.Book; import xyz.fycz.myreader.greendao.entity.Chapter; import xyz.fycz.myreader.greendao.entity.rule.BookSource; @@ -65,25 +47,16 @@ import xyz.fycz.myreader.ui.adapter.DetailCatalogAdapter; import xyz.fycz.myreader.ui.dialog.BookGroupDialog; import xyz.fycz.myreader.ui.dialog.DialogCreator; import xyz.fycz.myreader.ui.dialog.SourceExchangeDialog; -import xyz.fycz.myreader.util.IOUtils; -import xyz.fycz.myreader.util.ShareUtils; -import xyz.fycz.myreader.util.SharedPreUtils; -import xyz.fycz.myreader.util.help.StringHelper; import xyz.fycz.myreader.util.ToastUtils; -import xyz.fycz.myreader.util.utils.AdUtils; -import xyz.fycz.myreader.util.utils.BitmapUtil; +import xyz.fycz.myreader.util.help.StringHelper; import xyz.fycz.myreader.util.utils.BlurTransformation; -import xyz.fycz.myreader.util.utils.FileUtils; -import xyz.fycz.myreader.util.utils.GsonExtensionsKt; import xyz.fycz.myreader.util.utils.NetworkUtils; import xyz.fycz.myreader.util.utils.RxUtils; import xyz.fycz.myreader.util.utils.ShareBookUtil; -import xyz.fycz.myreader.util.utils.StringUtils; import xyz.fycz.myreader.webapi.BookApi; import xyz.fycz.myreader.webapi.crawler.ReadCrawlerUtil; import xyz.fycz.myreader.webapi.crawler.base.BookInfoCrawler; import xyz.fycz.myreader.webapi.crawler.base.ReadCrawler; -import xyz.fycz.myreader.webapi.crawler.source.ThirdCrawler; /** * @author fengyue @@ -254,45 +227,6 @@ public class BookDetailedActivity extends BaseActivity { mSourceDialog.setABooks(aBooks); mSourceDialog.setSourceIndex(sourceIndex); - initAd(); - } - - /** - * type 信息流类型,只能填 1、4、6、3 (样式请看下表) - * count 请求返回的信息流广告条目数,最小为 1,最大为 5,通常情况下建议一次返回一条 - */ - private void initAd() { - if (SharedPreUtils.getInstance().getBoolean("bookDetailAd", false)) { - AdUtils.checkHasAd().subscribe(new MySingleObserver() { - @Override - public void onSuccess(@NonNull Boolean aBoolean) { - if (aBoolean) { - AdUtils.initAd(); - new DdSdkFlowAd().getFlowViews(BookDetailedActivity.this, 6, 1, new DdSdkFlowAd.FlowCallback() { - // 信息流广告拉取完毕后返回的 views - @Override - public void getFlowViews(List views) { - Log.i(TAG, "信息流广告拉取完毕后返回了" + views.size() + "个view"); - binding.ic.getRoot().addView(views.get(0), 2); - } - - // 信息流广告展示后调用 - @Override - public void show() { - AdUtils.adRecord("flow", "adShow"); - Log.i(TAG, "信息流广告展示成功"); - } - - // 广告拉取失败调用 - @Override - public void error(String msg) { - Log.i(TAG, "广告拉取失败\n" + msg); - } - }); - } - } - }); - } } @Override diff --git a/app/src/main/java/xyz/fycz/myreader/ui/activity/DonateActivity.java b/app/src/main/java/xyz/fycz/myreader/ui/activity/DonateActivity.java index b1da373..26b1308 100644 --- a/app/src/main/java/xyz/fycz/myreader/ui/activity/DonateActivity.java +++ b/app/src/main/java/xyz/fycz/myreader/ui/activity/DonateActivity.java @@ -2,18 +2,10 @@ package xyz.fycz.myreader.ui.activity; import android.content.Intent; import android.net.Uri; -import android.util.Log; import android.view.View; import androidx.appcompat.widget.Toolbar; -import com.weaction.ddsdk.ad.DdSdkFlowAd; -import com.weaction.ddsdk.ad.DdSdkInterAd; -import com.weaction.ddsdk.ad.DdSdkInterVideoAd; -import com.weaction.ddsdk.ad.DdSdkRewardAd; - -import java.util.List; - import io.reactivex.annotations.NonNull; import xyz.fycz.myreader.R; import xyz.fycz.myreader.application.App; @@ -49,7 +41,7 @@ public class DonateActivity extends BaseActivity { @Override protected void initWidget() { - AdUtils.checkHasAd().subscribe(new MySingleObserver() { + /*AdUtils.checkHasAd().subscribe(new MySingleObserver() { @Override public void onSuccess(@NonNull Boolean aBoolean) { if (aBoolean) { @@ -57,37 +49,13 @@ public class DonateActivity extends BaseActivity { initAd(); } } - }); + });*/ } private void initAd() { binding.llAdSupport.setVisibility(View.VISIBLE); int flowAdCount = SharedPreUtils.getInstance().getInt("flowAdCount", 2); int count = App.isDebug() ? flowAdCount : 1; - new DdSdkFlowAd().getFlowViews(DonateActivity.this, 6, count, new DdSdkFlowAd.FlowCallback() { - // 信息流广告拉取完毕后返回的 views - @Override - public void getFlowViews(List views) { - Log.d(TAG, "信息流广告拉取完毕后返回了" + views.size() + "个view"); - for (int i = 0; i < views.size(); i++) { - View view = views.get(i); - binding.llAdSupport.addView(view, i + 2); - } - } - - // 信息流广告展示后调用 - @Override - public void show() { - AdUtils.adRecord("flow","adShow"); - Log.d(TAG, "信息流广告展示成功"); - } - - // 广告拉取失败调用 - @Override - public void error(String msg) { - Log.d(TAG, "广告拉取失败\n" + msg); - } - }); } @Override @@ -95,67 +63,6 @@ public class DonateActivity extends BaseActivity { binding.llWxZsm.setOnClickListener(v -> goDonate(URLCONST.WX_ZSM)); binding.llZfbSkm.setOnClickListener(v -> goDonate(URLCONST.ZFB_SKM)); binding.llQqSkm.setOnClickListener(v -> goDonate(URLCONST.QQ_SKM)); - binding.llRewardedVideo.setOnClickListener(v -> { - DdSdkRewardAd.show(this, new DdSdkRewardAd.DdSdkRewardCallback() { - @Override - public void show() { - Log.d(TAG, "激励视频展示成功"); - AdUtils.adRecord("rewardVideo","adShow"); - } - - @Override - public void click() { - Log.d(TAG, "激励视频被点击"); - AdUtils.adRecord("rewardVideo","adClick"); - } - - @Override - public void error(String msg) { - } - - @Override - public void skip() { - Log.d(TAG, "激励视频被跳过"); - AdUtils.adRecord("rewardVideo","adSkip"); - } - - @Override - public void finishCountdown() { - Log.d(TAG, "激励视频计时完成"); - AdUtils.adRecord("rewardVideo","adFinishCount"); - } - }); - }); - - binding.llInterAd.setOnClickListener(v -> { - /* - * 参数 1 activity - * 参数 2 marginDp (float),插屏默认 margin 全屏幕的 24dp,此处允许开发者手动调节 margin 大小,单位为 dp,允许范围为 0dp (全屏) ~ 48dp,请开发者按需填写 - */ - DdSdkInterAd.show(this, 48f, new DdSdkInterAd.Callback() { - @Override - public void show() { - Log.i(TAG, "插屏广告展示成功"); - AdUtils.adRecord("inter","adShow"); - } - - @Override - public void click() { - Log.i(TAG, "插屏广告"); - AdUtils.adRecord("inter","adClick"); - } - - @Override - public void error(String msg) { - } - - @Override - public void close() { - Log.i(TAG, "插屏广告被关闭"); - AdUtils.adRecord("inter","adClose"); - } - }); - }); } diff --git a/app/src/main/java/xyz/fycz/myreader/ui/activity/SplashActivity.java b/app/src/main/java/xyz/fycz/myreader/ui/activity/SplashActivity.java index c9735d5..b951724 100644 --- a/app/src/main/java/xyz/fycz/myreader/ui/activity/SplashActivity.java +++ b/app/src/main/java/xyz/fycz/myreader/ui/activity/SplashActivity.java @@ -1,9 +1,6 @@ package xyz.fycz.myreader.ui.activity; -import android.Manifest; import android.content.Intent; -import android.content.pm.PackageManager; -import android.os.Build; import android.os.Bundle; import android.util.Log; import android.view.KeyEvent; @@ -11,16 +8,11 @@ import android.view.View; import android.view.animation.Animation; import android.view.animation.AnimationUtils; -import androidx.annotation.NonNull; -import androidx.core.app.ActivityCompat; - import com.bumptech.glide.request.RequestOptions; import com.bumptech.glide.signature.ObjectKey; import com.gyf.immersionbar.ImmersionBar; import com.hjq.permissions.OnPermissionCallback; -import com.hjq.permissions.Permission; import com.hjq.permissions.XXPermissions; -import com.weaction.ddsdk.ad.DdSdkSplashAd; import java.io.File; import java.io.FileOutputStream; @@ -30,16 +22,14 @@ import java.util.List; import xyz.fycz.myreader.R; import xyz.fycz.myreader.application.App; import xyz.fycz.myreader.base.BaseActivity; -import xyz.fycz.myreader.base.observer.MySingleObserver; import xyz.fycz.myreader.common.APPCONST; import xyz.fycz.myreader.databinding.ActivitySplashBinding; import xyz.fycz.myreader.greendao.service.BookGroupService; import xyz.fycz.myreader.ui.dialog.MyAlertDialog; -import xyz.fycz.myreader.util.help.DateHelper; import xyz.fycz.myreader.util.IOUtils; import xyz.fycz.myreader.util.SharedPreUtils; import xyz.fycz.myreader.util.ToastUtils; -import xyz.fycz.myreader.util.utils.AdUtils; +import xyz.fycz.myreader.util.help.DateHelper; import xyz.fycz.myreader.util.utils.ImageLoader; import xyz.fycz.myreader.util.utils.MD5Utils; import xyz.fycz.myreader.util.utils.OkHttpUtils; @@ -156,7 +146,8 @@ public class SplashActivity extends BaseActivity { } private void start() { - if (adTimes >= 0 && todayAdCount >= adTimes) { + startNoAd(); + /*if (adTimes >= 0 && todayAdCount >= adTimes) { startNoAd(); } else { App.getHandler().postDelayed(() -> { @@ -182,7 +173,7 @@ public class SplashActivity extends BaseActivity { startNoAd(); } }); - } + }*/ } private void startNoAd() { @@ -217,7 +208,7 @@ public class SplashActivity extends BaseActivity { } private void startWithAd() { - try { + /*try { new DdSdkSplashAd().show(binding.flAd, this, new DdSdkSplashAd.CountdownCallback() { // 展示成功 @Override @@ -257,7 +248,7 @@ public class SplashActivity extends BaseActivity { e.printStackTrace(); WAIT_INTERVAL = 1500; startNormal(); - } + }*/ } diff --git a/app/src/main/java/xyz/fycz/myreader/util/utils/AdUtils.java b/app/src/main/java/xyz/fycz/myreader/util/utils/AdUtils.java index 8aab375..fbb5448 100644 --- a/app/src/main/java/xyz/fycz/myreader/util/utils/AdUtils.java +++ b/app/src/main/java/xyz/fycz/myreader/util/utils/AdUtils.java @@ -2,8 +2,6 @@ package xyz.fycz.myreader.util.utils; import android.util.Log; -import com.weaction.ddsdk.base.DdSdkHelper; - import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; @@ -13,12 +11,11 @@ import io.reactivex.SingleOnSubscribe; import io.reactivex.annotations.NonNull; import okhttp3.MediaType; import okhttp3.RequestBody; -import xyz.fycz.myreader.application.App; import xyz.fycz.myreader.base.observer.MySingleObserver; import xyz.fycz.myreader.common.URLCONST; import xyz.fycz.myreader.model.backup.UserService; -import xyz.fycz.myreader.util.help.DateHelper; import xyz.fycz.myreader.util.SharedPreUtils; +import xyz.fycz.myreader.util.help.DateHelper; /** * @author fengyue @@ -123,10 +120,6 @@ public class AdUtils { public static void initAd() { if (!hasInitAd) { hasInitAd = true; - DdSdkHelper.init("1234", "216", "51716a16fbdf50905704b6575b1b3b60", - "142364", "35ce0efe5f3cc960b116db227498e238", - "8167", "85bd159309c3da1b", - App.getApplication(), App.isDebug()); } } } diff --git a/app/src/main/res/layout/fragment_mine.xml b/app/src/main/res/layout/fragment_mine.xml index 47e6ba0..82c2265 100644 --- a/app/src/main/res/layout/fragment_mine.xml +++ b/app/src/main/res/layout/fragment_mine.xml @@ -325,6 +325,7 @@