V1.1(2)
This commit is contained in:
parent
3eb0aadb57
commit
b78e29fa15
@ -6,6 +6,12 @@ plugins {
|
||||
alias(libs.plugins.kotlin.android)
|
||||
id("kotlin-kapt")
|
||||
id("kotlin-parcelize")
|
||||
id("com.google.gms.google-services")
|
||||
id("com.google.firebase.crashlytics")
|
||||
id("applovin-quality-service")
|
||||
}
|
||||
applovin {
|
||||
apiKey = "2NDHUtVmS85hXJ7INJrCTTpkxihhidEyycMLDh_32gnvUv_LFG0f1HeKxFKhS1CGdF2xv1whGbHNiRFIraBfvn"
|
||||
}
|
||||
val timeStamp: String = SimpleDateFormat("MM_dd_HH_mm").format(Date())
|
||||
android {
|
||||
@ -16,8 +22,8 @@ android {
|
||||
applicationId = "com.apps.pixwall"
|
||||
minSdk = 24
|
||||
targetSdk = 35
|
||||
versionCode = 1
|
||||
versionName = "1.0"
|
||||
versionCode = 2
|
||||
versionName = "1.1"
|
||||
setProperty(
|
||||
"archivesBaseName",
|
||||
"Pix Wall_V" + versionName + "(${versionCode})_$timeStamp"
|
||||
@ -70,4 +76,31 @@ dependencies {
|
||||
implementation(libs.androidx.activity.ktx) // 可选,简化 ViewModel 获取
|
||||
implementation(libs.glide)
|
||||
implementation(libs.okhttp)
|
||||
|
||||
|
||||
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")
|
||||
|
||||
implementation(files("libs/UpLoadLibrary_07_03_11_54-release.aar"))
|
||||
implementation(files("libs/MaxLibrary_08_08_15_08-release.aar"))
|
||||
|
||||
implementation ("com.squareup.okhttp3:okhttp:4.12.0")
|
||||
implementation("com.squareup.okhttp3:logging-interceptor:4.12.0")
|
||||
|
||||
|
||||
//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
29
app/google-services.json
Normal file
@ -0,0 +1,29 @@
|
||||
{
|
||||
"project_info": {
|
||||
"project_number": "521704763807",
|
||||
"project_id": "pix-wall-54894",
|
||||
"storage_bucket": "pix-wall-54894.firebasestorage.app"
|
||||
},
|
||||
"client": [
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:521704763807:android:beb502847983e06c218daa",
|
||||
"android_client_info": {
|
||||
"package_name": "com.apps.pixwall"
|
||||
}
|
||||
},
|
||||
"oauth_client": [],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyC0oAeIv5WYLGjQeeTnit5Qaq_-XQf67t8"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": []
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"configuration_version": "1"
|
||||
}
|
||||
BIN
app/libs/MaxLibrary_08_08_15_08-release.aar
Normal file
BIN
app/libs/MaxLibrary_08_08_15_08-release.aar
Normal file
Binary file not shown.
BIN
app/libs/UpLoadLibrary_07_03_11_54-release.aar
Normal file
BIN
app/libs/UpLoadLibrary_07_03_11_54-release.aar
Normal file
Binary file not shown.
@ -4,9 +4,14 @@
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.SET_WALLPAPER" />
|
||||
<uses-permission
|
||||
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
|
||||
android:maxSdkVersion="32" />
|
||||
|
||||
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES"
|
||||
tools:ignore="SelectedPhotoAccess" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"
|
||||
android:maxSdkVersion="32"
|
||||
tools:ignore="SelectedPhotoAccess" />
|
||||
|
||||
|
||||
|
||||
<application
|
||||
android:name=".IApplication"
|
||||
@ -17,6 +22,7 @@
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/ic_launcher"
|
||||
android:supportsRtl="true"
|
||||
android:networkSecurityConfig="@xml/net"
|
||||
android:theme="@style/Theme.PixWall.Activity"
|
||||
tools:targetApi="31">
|
||||
<activity
|
||||
|
||||
@ -2,9 +2,11 @@ package com.apps.pixwall
|
||||
|
||||
import android.app.Application
|
||||
import android.util.Log
|
||||
import com.ad.maxlibrary.MaxInitManager
|
||||
import com.apps.pixwall.data.AppDataBase
|
||||
import com.apps.pixwall.data.PaperDao
|
||||
import com.apps.pixwall.util.ConvertUtil
|
||||
import com.up.uploadlibrary.UpLoadManager
|
||||
|
||||
import java.io.IOException
|
||||
|
||||
@ -34,6 +36,16 @@ class IApplication : Application() {
|
||||
isDataInitialized = true
|
||||
}.start()
|
||||
|
||||
MaxInitManager.init(
|
||||
this,
|
||||
"yJTWDCm78XKS7ZWNAryZTPQTiWmrXr6kxJrWr2hUxLLMI7Lr0KTvdUB7RRHoRPKf1SiyXSCaUZx3Xp8CSZKa_8",
|
||||
"22e1d07c7cb039bd",
|
||||
"807b12d65e0d3f15",
|
||||
"437eadd9d827b54c",
|
||||
"MAX_LOG"
|
||||
)
|
||||
UpLoadManager.init(this, "UP_LOG")
|
||||
|
||||
}
|
||||
|
||||
private fun initializeData(paperDao: PaperDao) {
|
||||
|
||||
@ -1,44 +1,47 @@
|
||||
package com.apps.pixwall.view
|
||||
|
||||
import android.content.Intent
|
||||
import android.health.connect.datatypes.units.Percentage
|
||||
import android.os.Bundle
|
||||
import android.os.CountDownTimer
|
||||
import android.os.Handler
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import com.ad.maxlibrary.WelComManager.initTimer
|
||||
import com.apps.pixwall.databinding.ActivityLoadBinding
|
||||
|
||||
|
||||
class LoadActivity : AppCompatActivity() {
|
||||
lateinit var binding: ActivityLoadBinding
|
||||
private var handler: Handler = Handler()
|
||||
private var countDownTimer: CountDownTimer? = null
|
||||
|
||||
private val time: Long = 14000
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
binding = ActivityLoadBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
handler.postDelayed({
|
||||
|
||||
countDownTimer = initTimer(this, time, { aLong: Long ->
|
||||
var progressPercentage = ((100 * aLong) / time)
|
||||
val i = (100 - progressPercentage).toInt()
|
||||
binding.progressbar.progress = i
|
||||
null
|
||||
}, {
|
||||
goMain()
|
||||
null
|
||||
})
|
||||
}
|
||||
|
||||
private fun goMain(){
|
||||
binding.progressbar.progress = 100
|
||||
val intent= Intent(
|
||||
this@LoadActivity,
|
||||
MainActivity::class.java
|
||||
)
|
||||
startActivity(intent)
|
||||
finish()
|
||||
}, 4000)
|
||||
countDownTimer = object : CountDownTimer(4000, 100) {
|
||||
override fun onTick(millisUntilFinished: Long) {
|
||||
val progress = ((4000 - millisUntilFinished) / 4000f * 100).toInt()
|
||||
binding.progressbar.progress = progress
|
||||
}
|
||||
|
||||
override fun onFinish() {
|
||||
binding.progressbar.progress = 100
|
||||
}
|
||||
}.start()
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
handler.removeCallbacksAndMessages(null)
|
||||
|
||||
|
||||
if (countDownTimer != null) {
|
||||
countDownTimer!!.cancel()
|
||||
|
||||
@ -8,6 +8,7 @@ import androidx.appcompat.app.AppCompatActivity
|
||||
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import com.ad.maxlibrary.MaxManager
|
||||
import com.apps.pixwall.adapter.DoubleLineAdapter
|
||||
|
||||
import com.apps.pixwall.data.MainViewModel
|
||||
@ -28,6 +29,10 @@ class MorePaperActivity : AppCompatActivity(),MainInListener {
|
||||
binding=ActivityMorePaperBinding.inflate(layoutInflater)
|
||||
init()
|
||||
setContentView(binding.root)
|
||||
MaxManager.onLoadAd()
|
||||
MaxManager.startShowMaxAd(this@MorePaperActivity){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private fun init(){
|
||||
|
||||
@ -9,6 +9,7 @@ import android.widget.Toast
|
||||
import androidx.activity.result.contract.ActivityResultContracts
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import com.ad.maxlibrary.MaxManager
|
||||
import com.apps.pixwall.R
|
||||
import com.apps.pixwall.data.MainViewModel
|
||||
import com.apps.pixwall.data.Paper
|
||||
@ -16,6 +17,7 @@ import com.apps.pixwall.databinding.ActivityPaperBinding
|
||||
import com.apps.pixwall.listener.ShowDialogListener
|
||||
import com.apps.pixwall.util.ConnectUtil
|
||||
import com.apps.pixwall.util.ConvertUtil
|
||||
import com.apps.pixwall.view.SearchActivity
|
||||
import com.bumptech.glide.Glide
|
||||
import com.bumptech.glide.load.DecodeFormat
|
||||
import com.bumptech.glide.request.RequestOptions
|
||||
@ -45,6 +47,7 @@ class PaperActivity : AppCompatActivity(), ShowDialogListener {
|
||||
) { permissions ->
|
||||
if (permissions.all { it.value }) {
|
||||
isGranted = true
|
||||
startSave()
|
||||
} else {
|
||||
Toast.makeText(this, getString(R.string.no_permit), Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
@ -54,6 +57,7 @@ class PaperActivity : AppCompatActivity(), ShowDialogListener {
|
||||
val permissions = ConvertUtil.getStoragePermissions()
|
||||
if (ConvertUtil.hasStoragePermission(this)) {
|
||||
isGranted = true
|
||||
startSave()
|
||||
} else {
|
||||
storagePermissionLauncher.launch(permissions)
|
||||
}
|
||||
@ -64,7 +68,12 @@ class PaperActivity : AppCompatActivity(), ShowDialogListener {
|
||||
super.onCreate(savedInstanceState)
|
||||
binding = ActivityPaperBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
MaxManager.onLoadAd()
|
||||
init()
|
||||
|
||||
MaxManager.startShowMaxAd (this@PaperActivity){
|
||||
|
||||
}
|
||||
}
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
@ -114,11 +123,18 @@ class PaperActivity : AppCompatActivity(), ShowDialogListener {
|
||||
}
|
||||
|
||||
binding.layoutDownload.setOnClickListener {
|
||||
startDownload()
|
||||
|
||||
requestStoragePermission()
|
||||
|
||||
|
||||
}
|
||||
binding.layoutSet.setOnClickListener {
|
||||
|
||||
MaxManager.startShowMaxAd (this@PaperActivity){
|
||||
showSetDialog()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private fun showSetDialog() {
|
||||
@ -135,17 +151,19 @@ class PaperActivity : AppCompatActivity(), ShowDialogListener {
|
||||
viewModel.setLike(paper)
|
||||
}
|
||||
|
||||
private fun startDownload() {
|
||||
requestStoragePermission()
|
||||
if (!isGranted) return
|
||||
|
||||
private fun startSave(){
|
||||
MaxManager.startShowMaxAd (this@PaperActivity){
|
||||
showDownloadLoading(true)
|
||||
if (downloadFile.exists()) {
|
||||
saveToGallery()
|
||||
return
|
||||
}
|
||||
}else{
|
||||
doDownload()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private fun saveToGallery() {
|
||||
val uri: Uri? = ConnectUtil.saveToGallery(this, downloadFile)
|
||||
runOnUiThread {
|
||||
|
||||
@ -12,6 +12,7 @@ import android.widget.Toast
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import com.ad.maxlibrary.MaxManager
|
||||
import com.apps.pixwall.R
|
||||
import com.apps.pixwall.adapter.DoubleLineAdapter
|
||||
import com.apps.pixwall.data.MainViewModel
|
||||
@ -30,7 +31,11 @@ class SearchActivity : AppCompatActivity(), MainInListener {
|
||||
super.onCreate(savedInstanceState)
|
||||
binding = ActivitySearchBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
MaxManager.onLoadAd()
|
||||
init()
|
||||
MaxManager.startShowMaxAd (this@SearchActivity){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private fun init() {
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
android:layout_marginHorizontal="20dp"
|
||||
android:max="100"
|
||||
android:layout_marginTop="20dp"
|
||||
android:progress="80"
|
||||
android:progress="1"
|
||||
android:indeterminateTint="@color/min_blue"
|
||||
android:progressDrawable="@drawable/load_pb" />
|
||||
|
||||
|
||||
6
app/src/main/res/xml/net.xml
Normal file
6
app/src/main/res/xml/net.xml
Normal 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>
|
||||
@ -2,4 +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("com.applovin.quality:AppLovinQualityServiceGradlePlugin:+")
|
||||
}
|
||||
}
|
||||
@ -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
|
||||
|
||||
@ -16,6 +16,10 @@ 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") }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user