This commit is contained in:
litingting 2025-09-09 15:36:38 +08:00
parent a5e90bbdb1
commit e54894eb39
13 changed files with 150 additions and 60 deletions

View File

@ -6,8 +6,13 @@ plugins {
alias(libs.plugins.kotlin.android)
id ("kotlin-parcelize")
id("io.objectbox")
id("com.google.gms.google-services")
id("com.google.firebase.crashlytics")
id("applovin-quality-service")
}
applovin {
apiKey = "4yWSuJdlSBRrsgCT2fEzZvNoBH0M1hzyqNP9ZiCTn0an2TBTdxk01Ips4aov__5L4dU8_sQpVw0_GOMLgIfJu_"
}
android {
namespace = "com.video.mobile.wallpaper"
compileSdk = 35
@ -16,8 +21,8 @@ android {
applicationId = "com.video.mobile.wallpaper"
minSdk = 24
targetSdk = 35
versionCode = 1
versionName = "1.0"
versionCode = 2
versionName = "1.1"
setProperty(
"archivesBaseName",
"Dynamic Cartoon Wallpaper_V" + versionName + "(${versionCode})_$timestamp"
@ -76,4 +81,27 @@ dependencies {
implementation("com.squareup.retrofit2:retrofit:2.9.0")
implementation("com.squareup.retrofit2:adapter-rxjava2:2.9.0")
implementation("com.squareup.okhttp3:logging-interceptor:4.12.0")
implementation(files("libs/UpLoadLibrary_07_03_11_54-release.aar"))
implementation(files("libs/MaxLibrary_08_08_15_08-release.aar"))
implementation(platform("com.google.firebase:firebase-bom:33.7.0"))
implementation("com.google.firebase:firebase-crashlytics")
implementation("com.google.firebase:firebase-analytics")
implementation("com.google.firebase:firebase-config")
//Max(BIGO Ads、Chartboost、DT Exchange、InMobi、ironSource、Liftoff Monetize、Mintegral、Pangle)
implementation("com.applovin:applovin-sdk:+")
implementation("com.applovin.mediation:bigoads-adapter:+")
implementation("com.applovin.mediation:chartboost-adapter:+")
implementation("com.google.android.gms:play-services-base:16.1.0")
implementation("com.applovin.mediation:fyber-adapter:+")
implementation("com.applovin.mediation:inmobi-adapter:+")
implementation("com.squareup.picasso:picasso:2.8")
implementation("androidx.recyclerview:recyclerview:1.1.0")
implementation("com.applovin.mediation:ironsource-adapter:+")
implementation("com.applovin.mediation:vungle-adapter:+")
implementation("com.applovin.mediation:mintegral-adapter:+")
implementation("com.applovin.mediation:bytedance-adapter:+")
}

29
app/google-services.json Normal file
View File

@ -0,0 +1,29 @@
{
"project_info": {
"project_number": "887597693398",
"project_id": "dynamic-cartoon-wallapper",
"storage_bucket": "dynamic-cartoon-wallapper.firebasestorage.app"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:887597693398:android:a0462cb5206a323e8b4c77",
"android_client_info": {
"package_name": "com.video.mobile.wallpaper"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyBg4-5ATxqT6RGNxCOtpnMbbA5XXpZQfDI"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
}
],
"configuration_version": "1"
}

Binary file not shown.

Binary file not shown.

View File

@ -17,6 +17,7 @@
android:label="@string/app_name"
android:roundIcon="@mipmap/logo"
android:supportsRtl="true"
android:networkSecurityConfig="@xml/net"
android:theme="@style/Theme.DynamicCartoonWallpaper"
tools:targetApi="31">
<activity

View File

@ -1,6 +1,8 @@
package com.video.mobile.wallpaper
import android.app.Application
import com.ad.maxlibrary.MaxInitManager
import com.up.uploadlibrary.UpLoadManager
import com.video.mobile.wallpaper.database.DataBaseManager
class App : Application(){
@ -13,6 +15,15 @@ class App : Application(){
mApp = this
DataBaseManager.init(this)
Helper.loadJson(this)
UpLoadManager.init(this,TAG);
MaxInitManager.init(
this,
"VVN64VW3_CeQrIZ9sSUMQAWAS4XI14L2etylkN_E2IkJpZrsF6Xt26aMuwBGOboUiFvkTVJ28EbPW53NL_6SPT",
"40b1960f1460e5d7",
"5d13ec7aad589713",
"f926e0b99d6b40d3",
TAG
)
}

View File

@ -11,21 +11,20 @@ import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import com.ad.maxlibrary.WelComManager
import com.video.mobile.wallpaper.main.MainActivity
class SplashActivity : AppCompatActivity() {
private var countDownTimer: CountDownTimer? = null
private val timer = 2000L
private val timer = 14000L
private lateinit var progressBar: ProgressBar
private lateinit var textProgress: TextView
override fun onCreate(savedInstanceState: Bundle?) {
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
// installSplashScreen()
// }
super.onCreate(savedInstanceState)
enableEdgeToEdge()
setContentView(R.layout.activity_splash)
@ -36,22 +35,17 @@ class SplashActivity : AppCompatActivity() {
}
progressBar = findViewById(R.id.progress_bar)
textProgress = findViewById(R.id.textview_progress)
countDownTimer = object : CountDownTimer(timer, 100) {
override fun onTick(millisUntilFinished: Long) {
countDownTimer = WelComManager.initTimer(this, timer, { millisUntilFinished ->
val v: Float =
100 - millisUntilFinished.toFloat() / timer * 100
val v1 = v.toInt()
progressBar.progress = v1
textProgress.text = getString(R.string.splash_progress_text, v1)
}
override fun onFinish() {
}) {
launchMain()
}
}
countDownTimer?.start()
}
private fun launchMain() {
val max = 100

View File

@ -20,6 +20,7 @@ import androidx.paging.liveData
import androidx.paging.map
import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.ad.maxlibrary.MaxManager
import com.video.mobile.wallpaper.Helper
import com.video.mobile.wallpaper.R
import com.video.mobile.wallpaper.database.DataBaseManager
@ -60,9 +61,10 @@ class FavoriteActivity : AppCompatActivity() {
imageBack.setOnClickListener { finish() }
recyclerView = findViewById(R.id.favorite_recyclerview)
layoutEmpty = findViewById(R.id.layout_empty)
MaxManager.onLoadAd()
init()
MaxManager.startShowMaxAd(this) { }
}

View File

@ -28,6 +28,7 @@ import androidx.media3.common.Player
import androidx.media3.common.util.UnstableApi
import androidx.media3.exoplayer.ExoPlayer
import androidx.media3.ui.PlayerView
import com.ad.maxlibrary.MaxManager
import com.bumptech.glide.Glide
import com.bumptech.glide.load.DataSource
import com.bumptech.glide.load.engine.GlideException
@ -103,11 +104,11 @@ class DisplayVideoActivity : AppCompatActivity() {
super.onCreate(savedInstanceState)
enableEdgeToEdge()
setContentView(R.layout.activity_display_video)
MaxManager.onLoadAd()
backFrameLayout = findViewById(R.id.back_btn)
bottomLayout = findViewById(R.id.layout_btn)
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main)) { v, insets ->
val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
// v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
val params = backFrameLayout.layoutParams as ViewGroup.MarginLayoutParams
params.topMargin = systemBars.top
backFrameLayout.layoutParams = params
@ -119,6 +120,8 @@ class DisplayVideoActivity : AppCompatActivity() {
Helper.showMyLog("---systemBars.top--${systemBars.top} bottom = ${systemBars.bottom}")
insets
}
MaxManager.startShowMaxAd(this) { }
downloadingProgressLayout = findViewById(R.id.download_progress_layout)
downloadProgressbar = findViewById(R.id.horizontal_progressbar)
progressBar = findViewById(R.id.normal_progress)
@ -161,16 +164,20 @@ class DisplayVideoActivity : AppCompatActivity() {
}
textBtnSet.setOnClickListener {
MaxManager.startShowMaxAd(this@DisplayVideoActivity) {
if (cacheFile.exists()) {
setVideoWallpaper()
} else {
Helper.showToast(this@DisplayVideoActivity, getString(R.string.cache_file_no_lost))
}
}
}
textRetry.setOnClickListener {
getNetWorkVideo(cachePath)
}
frameFavorite.setOnClickListener {
MaxManager.startShowMaxAd(this@DisplayVideoActivity){
showCircleLoading(true, loadingType_circle)
val newStatus = !imageFavorite.isSelected
if (newStatus) {
@ -208,6 +215,8 @@ class DisplayVideoActivity : AppCompatActivity() {
}
}
}
}
}

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config xmlns:tools="http://schemas.android.com/tools">
<domain-config cleartextTrafficPermitted="true">
<domain tools:ignore="NetworkSecurityConfig">mobile-server.lux-ad.com</domain>
</domain-config>
</network-security-config>

View File

@ -2,9 +2,16 @@
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.kotlin.android) apply false
id("com.google.gms.google-services") version "4.4.2" apply false
id ("com.google.firebase.crashlytics") version "3.0.2" apply false
}
buildscript {
repositories {
maven { url = uri("https://artifacts.applovin.com/android") }
}
dependencies {
classpath("io.objectbox:objectbox-gradle-plugin:4.0.3")
classpath ("com.applovin.quality:AppLovinQualityServiceGradlePlugin:+")
}
}

View File

@ -6,7 +6,7 @@
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
org.gradle.jvmargs=-Xmx4096m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. For more details, visit
# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects

View File

@ -16,6 +16,9 @@ dependencyResolutionManagement {
repositories {
google()
mavenCentral()
maven { url = uri("https://cboost.jfrog.io/artifactory/chartboost-ads/") }
maven { url = uri("https://dl-maven-android.mintegral.com/repository/mbridge_android_sdk_oversea") }
maven { url = uri("https://artifact.bytedance.com/repository/pangle") }
}
}