V1.1(2)
This commit is contained in:
parent
4be8421f21
commit
a6ac940d8b
@ -6,6 +6,8 @@ plugins {
|
|||||||
id("org.jetbrains.kotlin.android")
|
id("org.jetbrains.kotlin.android")
|
||||||
id("io.objectbox")
|
id("io.objectbox")
|
||||||
kotlin("kapt")
|
kotlin("kapt")
|
||||||
|
id("com.google.gms.google-services")
|
||||||
|
id("com.google.firebase.crashlytics")
|
||||||
}
|
}
|
||||||
// 生成时间戳(保持原有格式,但后续文件名中不包含特殊字符)
|
// 生成时间戳(保持原有格式,但后续文件名中不包含特殊字符)
|
||||||
val timestamp = SimpleDateFormat("MM_dd_HH_mm").format(Date())
|
val timestamp = SimpleDateFormat("MM_dd_HH_mm").format(Date())
|
||||||
@ -18,17 +20,25 @@ android {
|
|||||||
applicationId = "com.snap.wall"
|
applicationId = "com.snap.wall"
|
||||||
minSdk = 24
|
minSdk = 24
|
||||||
targetSdk = 36
|
targetSdk = 36
|
||||||
versionCode = 1
|
versionCode = 2
|
||||||
versionName = "1.0"
|
versionName = "1.1"
|
||||||
|
|
||||||
setProperty("archivesBaseName", "SnapWall_V" + versionName + "(${versionCode})_$timestamp")
|
setProperty("archivesBaseName", "SnapWall_V" + versionName + "(${versionCode})_$timestamp")
|
||||||
|
|
||||||
testInstrumentationRunner = "androidx.live.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.live.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
signingConfigs {
|
||||||
|
create("release") {
|
||||||
|
storeFile = file("../app/sapwall.jks")
|
||||||
|
storePassword = "snapwall"
|
||||||
|
keyAlias = "wallkey0"
|
||||||
|
keyPassword = "snapwall"
|
||||||
|
}
|
||||||
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
isMinifyEnabled = true
|
isMinifyEnabled = true
|
||||||
|
signingConfig = signingConfigs.getByName("release")
|
||||||
proguardFiles(
|
proguardFiles(
|
||||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||||
"proguard-rules.pro"
|
"proguard-rules.pro"
|
||||||
@ -63,4 +73,86 @@ dependencies {
|
|||||||
testImplementation("junit:junit:4.13.2")
|
testImplementation("junit:junit:4.13.2")
|
||||||
implementation("jp.wasabeef:glide-transformations:4.3.0") // Glide图片变换库
|
implementation("jp.wasabeef:glide-transformations:4.3.0") // Glide图片变换库
|
||||||
implementation("com.squareup.okhttp3:okhttp:5.3.1")
|
implementation("com.squareup.okhttp3:okhttp:5.3.1")
|
||||||
|
|
||||||
|
implementation(files("libs/TradPlusLibrary_11_25_15_02-release.aar"))
|
||||||
|
implementation(files("libs/UpLoadLibrary_12_03_15_13-release.aar"))
|
||||||
|
implementation("com.squareup.okhttp3:logging-interceptor:4.12.0")
|
||||||
|
|
||||||
|
|
||||||
|
implementation(platform("com.google.firebase:firebase-bom:34.6.0"))
|
||||||
|
implementation("com.google.firebase:firebase-crashlytics")
|
||||||
|
implementation("com.google.firebase:firebase-analytics")
|
||||||
|
implementation("com.google.firebase:firebase-config")
|
||||||
|
|
||||||
|
|
||||||
|
// TradPlus
|
||||||
|
implementation("com.tradplusad:tradplus:14.5.0.1")
|
||||||
|
//noinspection GradleCompatible
|
||||||
|
implementation("androidx.legacy:legacy-support-v4:1.0.0")
|
||||||
|
implementation("androidx.appcompat:appcompat:1.3.0-alpha02")
|
||||||
|
// Meta
|
||||||
|
implementation("com.facebook.android:audience-network-sdk:6.20.0")
|
||||||
|
implementation("com.tradplusad:tradplus-facebook:1.14.5.0.1")
|
||||||
|
// Applovin
|
||||||
|
implementation("com.applovin:applovin-sdk:13.3.1")
|
||||||
|
implementation("com.tradplusad:tradplus-applovin:9.14.5.0.1")
|
||||||
|
implementation("com.google.android.gms:play-services-ads-identifier:18.2.0")
|
||||||
|
// Ironsource
|
||||||
|
implementation("com.ironsource.sdk:mediationsdk:8.10.0")
|
||||||
|
implementation("com.tradplusad:tradplus-ironsource:10.14.5.0.1")
|
||||||
|
implementation("com.google.android.gms:play-services-appset:16.0.0")
|
||||||
|
implementation("com.google.android.gms:play-services-ads-identifier:17.0.0")
|
||||||
|
implementation("com.google.android.gms:play-services-basement:17.5.0")
|
||||||
|
// Adcolony
|
||||||
|
implementation("com.adcolony:sdk:4.8.0")
|
||||||
|
implementation("com.tradplusad:tradplus-adcolony:4.14.5.0.1")
|
||||||
|
implementation("com.google.android.gms:play-services-ads-identifier:17.0.0")
|
||||||
|
// Pangle
|
||||||
|
implementation("com.tradplusad:tradplus-pangle:19.14.5.0.1")
|
||||||
|
implementation("com.pangle.global:pag-sdk:7.3.0.3")
|
||||||
|
// UnityAds
|
||||||
|
implementation("com.tradplusad:tradplus-unity:5.14.5.0.1")
|
||||||
|
implementation("com.unity3d.ads:unity-ads:4.15.1")
|
||||||
|
// Chartboost
|
||||||
|
implementation("com.tradplusad:tradplus-chartboostx:15.14.5.0.1")
|
||||||
|
implementation("com.chartboost:chartboost-sdk:9.8.3")
|
||||||
|
implementation("com.google.android.gms:play-services-ads-identifier:17.0.0")
|
||||||
|
implementation("com.google.android.gms:play-services-base:17.4.0")
|
||||||
|
// Inmobi
|
||||||
|
implementation("com.tradplusad:tradplus-inmobix:23.14.5.0.1")
|
||||||
|
implementation("com.inmobi.monetization:inmobi-ads-kotlin:10.8.3")
|
||||||
|
implementation("androidx.core:core-ktx:1.5.0")
|
||||||
|
implementation("com.inmobi.omsdk:inmobi-omsdk:1.5.2.0")
|
||||||
|
// Fyber
|
||||||
|
implementation("com.fyber:marketplace-sdk:8.3.7")
|
||||||
|
implementation("com.tradplusad:tradplus-fyber:24.14.5.0.1")
|
||||||
|
implementation("com.google.android.gms:play-services-ads-identifier:17.0.0")
|
||||||
|
implementation("com.google.android.gms:play-services-base:17.4.0")
|
||||||
|
// Start.io
|
||||||
|
implementation("com.startapp:inapp-sdk:5.2.3")
|
||||||
|
implementation("com.tradplusad:tradplus-startapp:28.14.5.0.1")
|
||||||
|
// Mintegral
|
||||||
|
implementation("com.tradplusad:tradplus-mintegralx_overseas:18.14.5.0.1")
|
||||||
|
implementation("androidx.recyclerview:recyclerview:1.1.0")
|
||||||
|
implementation("com.mbridge.msdk.oversea:mbridge_android_sdk:16.9.71")
|
||||||
|
// Liftoff
|
||||||
|
implementation("com.tradplusad:tradplus-vunglex:7.14.5.0.1")
|
||||||
|
implementation("com.vungle:vungle-ads:7.5.0")
|
||||||
|
// Yandex
|
||||||
|
implementation("com.yandex.android:mobileads:7.13.0") {
|
||||||
|
exclude(group = "com.caverock", module = "androidsvg-aar")
|
||||||
|
}
|
||||||
|
implementation("com.tradplusad:tradplus-yandex:50.14.6.10.1")
|
||||||
|
// Bigo
|
||||||
|
implementation("com.bigossp:bigo-ads:5.4.0")
|
||||||
|
implementation("com.tradplusad:tradplus-bigo:57.14.5.0.1")
|
||||||
|
// Cross Promotion
|
||||||
|
implementation("com.tradplusad:tradplus-crosspromotion:27.14.5.0.1")
|
||||||
|
// TP Exchange
|
||||||
|
// 请注意保持与主包版本同步更新
|
||||||
|
implementation("com.google.code.gson:gson:2.8.6")
|
||||||
|
implementation("com.tradplusad:tp_exchange:40.14.5.0.1")
|
||||||
|
|
||||||
|
// Google UMP
|
||||||
|
implementation ("com.google.android.ump:user-messaging-platform:3.2.0")
|
||||||
}
|
}
|
||||||
29
app/google-services.json
Normal file
29
app/google-services.json
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"project_info": {
|
||||||
|
"project_number": "1032882946360",
|
||||||
|
"project_id": "snapwall-31057",
|
||||||
|
"storage_bucket": "snapwall-31057.firebasestorage.app"
|
||||||
|
},
|
||||||
|
"client": [
|
||||||
|
{
|
||||||
|
"client_info": {
|
||||||
|
"mobilesdk_app_id": "1:1032882946360:android:0d7012c1cd509ba8d401cd",
|
||||||
|
"android_client_info": {
|
||||||
|
"package_name": "com.snap.wall"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"oauth_client": [],
|
||||||
|
"api_key": [
|
||||||
|
{
|
||||||
|
"current_key": "AIzaSyDJvlImZmFuvlE8dpjaNg_NhqXPUIHc-5k"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"services": {
|
||||||
|
"appinvite_service": {
|
||||||
|
"other_platform_oauth_client": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"configuration_version": "1"
|
||||||
|
}
|
||||||
BIN
app/libs/TradPlusLibrary_11_25_15_02-release.aar
Normal file
BIN
app/libs/TradPlusLibrary_11_25_15_02-release.aar
Normal file
Binary file not shown.
BIN
app/libs/UpLoadLibrary_12_03_15_13-release.aar
Normal file
BIN
app/libs/UpLoadLibrary_12_03_15_13-release.aar
Normal file
Binary file not shown.
3
app/proguard-rules.pro
vendored
3
app/proguard-rules.pro
vendored
@ -28,5 +28,8 @@
|
|||||||
-keepattributes Signature
|
-keepattributes Signature
|
||||||
-keepattributes AnnotationDefault,RuntimeVisibleAnnotations
|
-keepattributes AnnotationDefault,RuntimeVisibleAnnotations
|
||||||
|
|
||||||
|
-keep public class com.tradplus.** { *; }
|
||||||
|
-keep class com.tradplus.ads.** { *; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -17,6 +17,8 @@
|
|||||||
<application
|
<application
|
||||||
android:name=".App"
|
android:name=".App"
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
|
android:networkSecurityConfig="@xml/net"
|
||||||
|
tools:replace="networkSecurityConfig"
|
||||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||||
android:fullBackupContent="@xml/backup_rules"
|
android:fullBackupContent="@xml/backup_rules"
|
||||||
android:icon="@mipmap/logo_snap"
|
android:icon="@mipmap/logo_snap"
|
||||||
@ -25,9 +27,6 @@
|
|||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/Theme.Wallpaper"
|
android:theme="@style/Theme.Wallpaper"
|
||||||
tools:targetApi="31">
|
tools:targetApi="31">
|
||||||
<activity
|
|
||||||
android:name=".activity.RencentActivity"
|
|
||||||
android:exported="false" />
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".activity.MySearchActivity"
|
android:name=".activity.MySearchActivity"
|
||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import com.snap.wall.bean.Information;
|
|||||||
import com.snap.wall.mytool.Comutils;
|
import com.snap.wall.mytool.Comutils;
|
||||||
import com.snap.wall.mytool.ObectManager;
|
import com.snap.wall.mytool.ObectManager;
|
||||||
import com.snap.wall.mytool.JsonData;
|
import com.snap.wall.mytool.JsonData;
|
||||||
|
import com.up.uploadlibrary.UpLoadManager;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
@ -18,10 +19,10 @@ import java.util.List;
|
|||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.ExecutorService;
|
||||||
import java.util.concurrent.Executors;
|
import java.util.concurrent.Executors;
|
||||||
|
|
||||||
// 移除ObjectBox的import,避免手动创建
|
import kotlin.Unit;
|
||||||
// import io.objectbox.BoxStore;
|
import kotlin.jvm.functions.Function2;
|
||||||
// import com.snap.wall.mybean.MyObjectBox;
|
|
||||||
// import com.snap.wall.mybean.History;
|
|
||||||
|
|
||||||
public class App extends Application {
|
public class App extends Application {
|
||||||
public static Context mAppContext;
|
public static Context mAppContext;
|
||||||
@ -48,6 +49,13 @@ public class App extends Application {
|
|||||||
mAppContext = this;
|
mAppContext = this;
|
||||||
defaultFont = Typeface.createFromAsset(getAssets(), "custfont.ttf");
|
defaultFont = Typeface.createFromAsset(getAssets(), "custfont.ttf");
|
||||||
|
|
||||||
|
UpLoadManager.INSTANCE.init(this, TAG, new Function2<String, String, Unit>() {
|
||||||
|
@Override
|
||||||
|
public Unit invoke(String s, String s2) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
ObectManager.init(this);
|
ObectManager.init(this);
|
||||||
executor = Executors.newFixedThreadPool(8);
|
executor = Executors.newFixedThreadPool(8);
|
||||||
String[] names = {wallpaperName, animasName, exName, filmName, natureName, pattName, streetName, travelName};
|
String[] names = {wallpaperName, animasName, exName, filmName, natureName, pattName, streetName, travelName};
|
||||||
@ -93,28 +101,4 @@ public class App extends Application {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// private void initTop(){
|
|
||||||
// ATSDK.checkIsEuTraffic(this, new NetTrafficeCallback() {
|
|
||||||
//
|
|
||||||
// @Override
|
|
||||||
// public void onResultCallback(boolean isEU) {
|
|
||||||
// Log.e(TAG, "onResultCallback:" + isEU);
|
|
||||||
// if (isEU && ATSDK.getGDPRDataLevel( MyApp.mAppContext) == ATSDK.UNKNOWN) {
|
|
||||||
// ATSDK.showGdprAuth(MyApp.mAppContext);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Override
|
|
||||||
// public void onErrorCallback(String errorMsg) {
|
|
||||||
// Log.e(TAG, "onErrorCallback:" + errorMsg);
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
//
|
|
||||||
// ATSDK.init( this, APPId, AppKey);
|
|
||||||
// //测试工具
|
|
||||||
//// ATDebuggerUITest.showDebuggerUI(this,debug_Key);
|
|
||||||
// AdManager.loadAllAd();
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,11 +9,12 @@ import android.widget.TextView.OnEditorActionListener
|
|||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.recyclerview.widget.GridLayoutManager
|
import androidx.recyclerview.widget.GridLayoutManager
|
||||||
|
import com.ad.tradpluslibrary.TPAdManager
|
||||||
import com.snap.wall.R
|
import com.snap.wall.R
|
||||||
import com.snap.wall.adapter.OnItemclick
|
import com.snap.wall.adapter.OnItemclick
|
||||||
|
import com.snap.wall.bean.Information
|
||||||
import com.snap.wall.databinding.ActivitySearchBinding
|
import com.snap.wall.databinding.ActivitySearchBinding
|
||||||
import com.snap.wall.myitem.ItemTab
|
import com.snap.wall.myitem.ItemTab
|
||||||
import com.snap.wall.bean.Information
|
|
||||||
import com.snap.wall.mytool.Comutils
|
import com.snap.wall.mytool.Comutils
|
||||||
import com.snap.wall.mytool.Itemhelper
|
import com.snap.wall.mytool.Itemhelper
|
||||||
import com.snap.wall.mytool.ObectManager
|
import com.snap.wall.mytool.ObectManager
|
||||||
@ -29,8 +30,9 @@ class MySearchActivity : AppCompatActivity() ,
|
|||||||
Comutils.initFull(this, false)
|
Comutils.initFull(this, false)
|
||||||
initList()
|
initList()
|
||||||
binding.imageviewBack.setOnClickListener {
|
binding.imageviewBack.setOnClickListener {
|
||||||
finish()
|
TPAdManager.showTPAD(this@MySearchActivity) { finish() }
|
||||||
}
|
}
|
||||||
|
TPAdManager.showTPAD(this@MySearchActivity){}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,12 +6,19 @@ import android.widget.ProgressBar;
|
|||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
import com.ad.tradpluslibrary.TPAdManager;
|
||||||
|
import com.snap.wall.App;
|
||||||
import com.snap.wall.R;
|
import com.snap.wall.R;
|
||||||
import com.snap.wall.mytool.Comutils;
|
import com.snap.wall.mytool.Comutils;
|
||||||
import android.os.CountDownTimer;
|
import android.os.CountDownTimer;
|
||||||
|
|
||||||
|
import kotlin.Unit;
|
||||||
|
import kotlin.jvm.functions.Function0;
|
||||||
|
import kotlin.jvm.functions.Function1;
|
||||||
|
|
||||||
public class OneActivity extends AppCompatActivity {
|
public class OneActivity extends AppCompatActivity {
|
||||||
private static final long TOTAL_TIME = 2000;
|
private static final long TOTAL_TIME = 12000;
|
||||||
// 进度更新间隔(50毫秒)
|
// 进度更新间隔(50毫秒)
|
||||||
private static final long UPDATE_INTERVAL = 50;
|
private static final long UPDATE_INTERVAL = 50;
|
||||||
|
|
||||||
@ -30,24 +37,41 @@ public class OneActivity extends AppCompatActivity {
|
|||||||
startCountDown();
|
startCountDown();
|
||||||
}
|
}
|
||||||
private void startCountDown() {
|
private void startCountDown() {
|
||||||
countDownTimer = new CountDownTimer(TOTAL_TIME, UPDATE_INTERVAL) {
|
TPAdManager.INSTANCE.init(
|
||||||
|
this,
|
||||||
|
App.TAG,
|
||||||
|
"909D20753E5D8EB9FEC5DD675DF72811",
|
||||||
|
"DDFEBCA71E78A60F5F089D3A5FBC0912",
|
||||||
|
"1A841D5996F8106028429E8799174612",
|
||||||
|
"BDEA3F104E55C2518696BD77AA80C112",
|
||||||
|
new Function0<Unit>() {
|
||||||
@Override
|
@Override
|
||||||
public void onTick(long millisUntilFinished) {
|
public Unit invoke() {
|
||||||
long elapsedTime = TOTAL_TIME - millisUntilFinished;
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
) ;
|
||||||
|
countDownTimer = TPAdManager.INSTANCE.showWelcomeAd(this, TOTAL_TIME, new Function1<Long, Unit>() {
|
||||||
|
@Override
|
||||||
|
public Unit invoke(Long aLong) {
|
||||||
|
long elapsedTime = TOTAL_TIME - aLong;
|
||||||
int progress = (int) (elapsedTime * 100 / TOTAL_TIME);
|
int progress = (int) (elapsedTime * 100 / TOTAL_TIME);
|
||||||
progressBar.setProgress(progress);
|
progressBar.setProgress(progress);
|
||||||
tvProgress.setText(progress + "%");
|
tvProgress.setText(progress + "%");
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
}, new Function0<Unit>() {
|
||||||
@Override
|
@Override
|
||||||
public void onFinish() {
|
public Unit invoke() {
|
||||||
progressBar.setProgress(100);
|
progressBar.setProgress(100);
|
||||||
tvProgress.setText("100%");
|
tvProgress.setText("100%");
|
||||||
Intent intent = new Intent(OneActivity.this, PrimaryActivity.class);
|
Intent intent = new Intent(OneActivity.this, PrimaryActivity.class);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
finish();
|
finish();
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
}.start();
|
}) ;
|
||||||
|
countDownTimer.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -15,6 +15,7 @@ import androidx.annotation.NonNull;
|
|||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
import com.ad.tradpluslibrary.TPAdManager;
|
||||||
import com.bumptech.glide.Glide;
|
import com.bumptech.glide.Glide;
|
||||||
import com.bumptech.glide.load.DataSource;
|
import com.bumptech.glide.load.DataSource;
|
||||||
import com.bumptech.glide.load.DecodeFormat;
|
import com.bumptech.glide.load.DecodeFormat;
|
||||||
@ -42,6 +43,8 @@ import java.util.Locale;
|
|||||||
import java.util.Timer;
|
import java.util.Timer;
|
||||||
import java.util.TimerTask;
|
import java.util.TimerTask;
|
||||||
|
|
||||||
|
import kotlin.Unit;
|
||||||
|
import kotlin.jvm.functions.Function0;
|
||||||
import okhttp3.Call;
|
import okhttp3.Call;
|
||||||
|
|
||||||
public class PreviewActivity extends AppCompatActivity implements OnSelecttype {
|
public class PreviewActivity extends AppCompatActivity implements OnSelecttype {
|
||||||
@ -75,6 +78,12 @@ public class PreviewActivity extends AppCompatActivity implements OnSelecttype {
|
|||||||
finish();
|
finish();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
TPAdManager.INSTANCE.showTPAD(PreviewActivity.this, new Function0<Unit>() {
|
||||||
|
@Override
|
||||||
|
public Unit invoke() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
imId = data.getImId();
|
imId = data.getImId();
|
||||||
mSavePath = JsonData.INSTANCE.getSaveFilePath(this, imId);
|
mSavePath = JsonData.INSTANCE.getSaveFilePath(this, imId);
|
||||||
fullUrl = data.getFullUrl();
|
fullUrl = data.getFullUrl();
|
||||||
@ -188,13 +197,23 @@ public class PreviewActivity extends AppCompatActivity implements OnSelecttype {
|
|||||||
vb.imageviewBack.setOnClickListener(v -> finish());
|
vb.imageviewBack.setOnClickListener(v -> finish());
|
||||||
|
|
||||||
vb.buttonSet.setOnClickListener(v -> {
|
vb.buttonSet.setOnClickListener(v -> {
|
||||||
|
|
||||||
|
|
||||||
|
TPAdManager.INSTANCE.showTPAD(PreviewActivity.this, new Function0<Unit>() {
|
||||||
|
@Override
|
||||||
|
public Unit invoke() {
|
||||||
if (dialogType == null) {
|
if (dialogType == null) {
|
||||||
dialogType = new Mydialog();
|
dialogType = new Mydialog();
|
||||||
dialogType.setListener(this);
|
dialogType.setListener(PreviewActivity.this);
|
||||||
}
|
}
|
||||||
if (!dialogType.isAdded()) {
|
if (!dialogType.isAdded()) {
|
||||||
dialogType.show(getSupportFragmentManager(), "");
|
dialogType.show(getSupportFragmentManager(), "");
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
vb.imageFavorite.setOnClickListener(v -> {
|
vb.imageFavorite.setOnClickListener(v -> {
|
||||||
@ -205,9 +224,16 @@ public class PreviewActivity extends AppCompatActivity implements OnSelecttype {
|
|||||||
});
|
});
|
||||||
|
|
||||||
vb.layoutDownload.setOnClickListener(v -> {
|
vb.layoutDownload.setOnClickListener(v -> {
|
||||||
if (JsonData.INSTANCE.requestPermission(this, permissionCode)) {
|
TPAdManager.INSTANCE.showTPAD(PreviewActivity.this, new Function0<Unit>() {
|
||||||
|
@Override
|
||||||
|
public Unit invoke() {
|
||||||
|
if (JsonData.INSTANCE.requestPermission(PreviewActivity.this, permissionCode)) {
|
||||||
startSaveToAlbum();
|
startSaveToAlbum();
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,62 +0,0 @@
|
|||||||
package com.snap.wall.activity;
|
|
||||||
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.widget.ImageView;
|
|
||||||
import android.widget.TextView;
|
|
||||||
import android.widget.Toast;
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
|
||||||
import androidx.fragment.app.FragmentTransaction;
|
|
||||||
import com.snap.wall.R;
|
|
||||||
import com.snap.wall.RecentWallpaperManager;
|
|
||||||
import com.snap.wall.fragment.RecentWallpaperFragment;
|
|
||||||
import com.snap.wall.mytool.Comutils;
|
|
||||||
|
|
||||||
public class RencentActivity extends AppCompatActivity {
|
|
||||||
|
|
||||||
private RecentWallpaperManager recentManager;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
setContentView(R.layout.activity_rencent);
|
|
||||||
Comutils.initFull(this, false);
|
|
||||||
|
|
||||||
recentManager = RecentWallpaperManager.getInstance(this);
|
|
||||||
ImageView ivBack = findViewById(R.id.iv_back);
|
|
||||||
if (ivBack != null) {
|
|
||||||
ivBack.setOnClickListener(v -> {
|
|
||||||
finish();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// 清除按钮点击
|
|
||||||
TextView tvClearAll = findViewById(R.id.tv_clear_all);
|
|
||||||
tvClearAll.setOnClickListener(v -> {
|
|
||||||
recentManager.clear();
|
|
||||||
Toast.makeText(this, "All recent browsing history has been cleared", Toast.LENGTH_SHORT).show();
|
|
||||||
reloadRecentFragment();
|
|
||||||
});
|
|
||||||
|
|
||||||
// 加载Fragment
|
|
||||||
if (savedInstanceState == null) {
|
|
||||||
loadRecentFragment();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void loadRecentFragment() {
|
|
||||||
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
|
|
||||||
transaction.replace(R.id.fragment_container, new RecentWallpaperFragment());
|
|
||||||
transaction.commit();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void reloadRecentFragment() {
|
|
||||||
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
|
|
||||||
transaction.replace(R.id.fragment_container, new RecentWallpaperFragment());
|
|
||||||
transaction.commit();
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
protected void onDestroy() {
|
|
||||||
super.onDestroy();
|
|
||||||
// 仅保留super调用,删除所有Glide相关代码
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -7,6 +7,7 @@ import android.view.View;
|
|||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.recyclerview.widget.GridLayoutManager;
|
import androidx.recyclerview.widget.GridLayoutManager;
|
||||||
|
|
||||||
|
import com.ad.tradpluslibrary.TPAdManager;
|
||||||
import com.snap.wall.adapter.OnItemclick;
|
import com.snap.wall.adapter.OnItemclick;
|
||||||
import com.snap.wall.databinding.ActivityTabBinding;
|
import com.snap.wall.databinding.ActivityTabBinding;
|
||||||
import com.snap.wall.bean.Information;
|
import com.snap.wall.bean.Information;
|
||||||
@ -17,6 +18,9 @@ import com.snap.wall.mytool.ObectManager;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import kotlin.Unit;
|
||||||
|
import kotlin.jvm.functions.Function0;
|
||||||
|
|
||||||
public class TabActivity extends AppCompatActivity implements OnItemclick {
|
public class TabActivity extends AppCompatActivity implements OnItemclick {
|
||||||
private ActivityTabBinding vb;
|
private ActivityTabBinding vb;
|
||||||
|
|
||||||
@ -38,6 +42,12 @@ public class TabActivity extends AppCompatActivity implements OnItemclick {
|
|||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
TPAdManager.INSTANCE.showTPAD(TabActivity.this, new Function0<Unit>() {
|
||||||
|
@Override
|
||||||
|
public Unit invoke() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initList() {
|
private void initList() {
|
||||||
|
|||||||
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>
|
||||||
@ -3,7 +3,8 @@ plugins {
|
|||||||
id("com.android.application") version "8.13.1" apply false
|
id("com.android.application") version "8.13.1" apply false
|
||||||
id("org.jetbrains.kotlin.android") version "2.2.21" apply false
|
id("org.jetbrains.kotlin.android") version "2.2.21" apply false
|
||||||
kotlin("kapt") version "1.9.0"
|
kotlin("kapt") version "1.9.0"
|
||||||
|
id("com.google.gms.google-services") version "4.4.2" apply false
|
||||||
|
id ("com.google.firebase.crashlytics") version "3.0.2" apply false
|
||||||
}
|
}
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
|
|||||||
BIN
dependencies.txt
BIN
dependencies.txt
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
app_name=SnapWall
|
app_name=SnapWall
|
||||||
package_name=com.snap.wall
|
package_name=com.snap.wall
|
||||||
keystoreFile=app/snapwall.jks
|
keystoreFile=app/sapwall.jks
|
||||||
key_alias=wallkey0
|
key_alias=wallkey0
|
||||||
key_store_password=sapwall
|
key_store_password=snapwall
|
||||||
key_password=snapwall
|
key_password=snapwall
|
||||||
@ -11,28 +11,26 @@ dependencyResolutionManagement {
|
|||||||
google()
|
google()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
|
||||||
//
|
//------------------------- TradPlus
|
||||||
// //Anythink(Core)
|
// Ironsource
|
||||||
// maven ("https://jfrog.anythinktech.com/artifactory/overseas_sdk")
|
maven { url = uri("https://android-sdk.is.com/") }
|
||||||
//
|
// Pangle
|
||||||
// //Appnext
|
maven {
|
||||||
// maven ("https://dl.appnext.com")
|
url = uri("https://artifact.bytedance.com/repository/pangle")
|
||||||
//
|
}
|
||||||
// //Ironsource
|
// Chartboost
|
||||||
// maven ("https://android-sdk.is.com/")
|
maven { url = uri("https://cboost.jfrog.io/artifactory/chartboost-ads/") }
|
||||||
//
|
maven {
|
||||||
// //Pangle
|
name = "Chartboost Mediation’s maven repo"
|
||||||
// maven ("https://artifact.bytedance.com/repository/pangle")
|
url = uri("https://cboost.jfrog.io/artifactory/chartboost-mediation")
|
||||||
//
|
}
|
||||||
// //Mintegral
|
// Mintegral
|
||||||
// maven ("https://dl-maven-android.mintegral.com/repository/mbridge_android_sdk_oversea")
|
//Launch GP market application, Android X Version
|
||||||
//
|
//If you fail to pull the code using gradle, add the maven warehouse configuration to the project root build.gradle file
|
||||||
// //Chartboost
|
maven {
|
||||||
// maven ("https://cboost.jfrog.io/artifactory/chartboost-ads")
|
url =
|
||||||
// maven ("https://cboost.jfrog.io/artifactory/chartboost-mediation")
|
uri("https://dl-maven-android.mintegral.com/repository/mbridge_android_sdk_oversea")
|
||||||
//
|
}
|
||||||
// //TopOn集成测试工具
|
|
||||||
// maven ( "https://jfrog.anythinktech.com/artifactory/debugger")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user