V1.2(3)
This commit is contained in:
parent
52bf286c69
commit
48591f58d0
@ -4,18 +4,20 @@ plugins {
|
|||||||
alias(libs.plugins.android.application)
|
alias(libs.plugins.android.application)
|
||||||
alias(libs.plugins.kotlin.android)
|
alias(libs.plugins.kotlin.android)
|
||||||
id("io.objectbox")
|
id("io.objectbox")
|
||||||
|
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())
|
||||||
android {
|
android {
|
||||||
namespace = "com.newapp.paperwall"
|
namespace = "com.newapp.paperwall"
|
||||||
compileSdk = 35
|
compileSdk = 36
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId = "com.newapp.paperwall"
|
applicationId = "com.newapp.paperwall"
|
||||||
minSdk = 24
|
minSdk = 24
|
||||||
targetSdk = 35
|
targetSdk = 36
|
||||||
versionCode = 2
|
versionCode = 3
|
||||||
versionName = "1.1"
|
versionName = "1.2"
|
||||||
setProperty(
|
setProperty(
|
||||||
"archivesBaseName",
|
"archivesBaseName",
|
||||||
"Photo Wallpaper_V" + versionName + "(${versionCode})_$timestamp"
|
"Photo Wallpaper_V" + versionName + "(${versionCode})_$timestamp"
|
||||||
@ -61,4 +63,90 @@ dependencies {
|
|||||||
implementation(libs.objectbox.android)
|
implementation(libs.objectbox.android)
|
||||||
annotationProcessor(libs.objectbox.processor)
|
annotationProcessor(libs.objectbox.processor)
|
||||||
implementation(libs.okhttp)
|
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/TopOnLibrary_06_27_16_00-release.aar"))
|
||||||
|
implementation(files("libs/UpLoadLibrary_07_03_11_54-release.aar"))
|
||||||
|
|
||||||
|
//-----------------------------------------------TopOn(Mintegral、Pangle、UnitAds、Digital Turbine(Fyber)、Chartboost&Helium、Ironsource、Liftoff(Vungle)、Inmobi、Start.io、Bigo)
|
||||||
|
//TU (Necessary)
|
||||||
|
implementation("com.thinkup.sdk:core-tpn:6.4.90")
|
||||||
|
implementation("com.thinkup.sdk:nativead-tpn:6.4.90")
|
||||||
|
implementation("com.thinkup.sdk:banner-tpn:6.4.90")
|
||||||
|
implementation("com.thinkup.sdk:interstitial-tpn:6.4.90")
|
||||||
|
implementation("com.thinkup.sdk:rewardedvideo-tpn:6.4.90")
|
||||||
|
implementation("com.thinkup.sdk:splash-tpn:6.4.90")
|
||||||
|
|
||||||
|
//Androidx (Necessary)
|
||||||
|
implementation("androidx.appcompat:appcompat:1.6.1")
|
||||||
|
implementation("androidx.browser:browser:1.4.0")
|
||||||
|
|
||||||
|
//StartApp
|
||||||
|
implementation("com.thinkup.sdk:adapter-tpn-startapp:6.4.90")
|
||||||
|
implementation("com.startapp:inapp-sdk:5.0.2")
|
||||||
|
|
||||||
|
//Vungle
|
||||||
|
implementation("com.thinkup.sdk:adapter-tpn-vungle:6.4.90")
|
||||||
|
implementation("com.vungle:vungle-ads:7.5.0")
|
||||||
|
implementation("com.google.android.gms:play-services-basement:18.1.0")
|
||||||
|
implementation("com.google.android.gms:play-services-ads-identifier:18.0.1")
|
||||||
|
|
||||||
|
//UnityAds
|
||||||
|
implementation("com.thinkup.sdk:adapter-tpn-unityads:6.4.90")
|
||||||
|
implementation("com.unity3d.ads:unity-ads:4.14.0")
|
||||||
|
|
||||||
|
//Ironsource
|
||||||
|
implementation("com.thinkup.sdk:adapter-tpn-ironsource:6.4.90")
|
||||||
|
implementation("com.ironsource.sdk:mediationsdk:8.7.0")
|
||||||
|
implementation("com.google.android.gms:play-services-appset:16.0.2")
|
||||||
|
implementation("com.google.android.gms:play-services-ads-identifier:18.0.1")
|
||||||
|
implementation("com.google.android.gms:play-services-basement:18.1.0")
|
||||||
|
|
||||||
|
//Bigo
|
||||||
|
implementation("com.thinkup.sdk:adapter-tpn-bigo:6.4.90")
|
||||||
|
implementation("com.bigossp:bigo-ads:5.3.0")
|
||||||
|
|
||||||
|
//Pangle
|
||||||
|
implementation("com.thinkup.sdk:adapter-tpn-pangle:6.4.90.1")
|
||||||
|
implementation("com.pangle.global:pag-sdk:7.2.0.6")
|
||||||
|
implementation("com.google.android.gms:play-services-ads-identifier:18.2.0")
|
||||||
|
|
||||||
|
//Inmobi
|
||||||
|
implementation("com.thinkup.sdk:adapter-tpn-inmobi:6.4.90")
|
||||||
|
implementation("com.inmobi.monetization:inmobi-ads-kotlin:10.8.2")
|
||||||
|
|
||||||
|
//Mintegral
|
||||||
|
implementation("com.thinkup.sdk:adapter-tpn-mintegral:6.4.90")
|
||||||
|
implementation("com.mbridge.msdk.oversea:mbridge_android_sdk:16.9.71")
|
||||||
|
implementation("androidx.recyclerview:recyclerview:1.1.0")
|
||||||
|
|
||||||
|
//Chartboost
|
||||||
|
implementation("com.thinkup.sdk:adapter-tpn-chartboost:6.4.90")
|
||||||
|
implementation("com.chartboost:chartboost-sdk:9.8.3")
|
||||||
|
implementation("com.chartboost:chartboost-mediation-sdk:4.9.2")
|
||||||
|
implementation("com.chartboost:chartboost-mediation-adapter-chartboost:4.9.8.1.0")
|
||||||
|
implementation("com.jakewharton.retrofit:retrofit2-kotlinx-serialization-converter:1.0.0")
|
||||||
|
implementation("com.squareup.okhttp3:logging-interceptor:4.10.0")
|
||||||
|
implementation("com.squareup.okhttp3:okhttp:4.10.0")
|
||||||
|
implementation("com.squareup.retrofit2:converter-scalars:2.9.0")
|
||||||
|
implementation("com.squareup.retrofit2:retrofit:2.9.0")
|
||||||
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.1")
|
||||||
|
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.1")
|
||||||
|
|
||||||
|
//Fyber
|
||||||
|
implementation("com.thinkup.sdk:adapter-tpn-fyber:6.4.90")
|
||||||
|
implementation("com.fyber:marketplace-sdk:8.3.7")
|
||||||
|
implementation("com.google.android.gms:play-services-ads-identifier:18.0.1")
|
||||||
|
|
||||||
|
//Tramini
|
||||||
|
implementation("com.thinkup.sdk:tramini-plugin-tpn:6.4.90")
|
||||||
|
|
||||||
|
// Debugger UI Tools
|
||||||
|
implementation("com.anythink.sdk:debugger-ui:1.1.0")
|
||||||
|
|
||||||
|
//----------------------------------------------TopOn
|
||||||
}
|
}
|
||||||
29
app/google-services.json
Normal file
29
app/google-services.json
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"project_info": {
|
||||||
|
"project_number": "252905247063",
|
||||||
|
"project_id": "photo-wallpaper-b5396",
|
||||||
|
"storage_bucket": "photo-wallpaper-b5396.firebasestorage.app"
|
||||||
|
},
|
||||||
|
"client": [
|
||||||
|
{
|
||||||
|
"client_info": {
|
||||||
|
"mobilesdk_app_id": "1:252905247063:android:2dac4395ee7f1aba4e2e12",
|
||||||
|
"android_client_info": {
|
||||||
|
"package_name": "com.newapp.paperwall"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"oauth_client": [],
|
||||||
|
"api_key": [
|
||||||
|
{
|
||||||
|
"current_key": "AIzaSyA-gQ0GMnCTk69651FvzbzkBWak7u4kdFY"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"services": {
|
||||||
|
"appinvite_service": {
|
||||||
|
"other_platform_oauth_client": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"configuration_version": "1"
|
||||||
|
}
|
||||||
BIN
app/libs/TopOnLibrary_06_27_16_00-release.aar
Normal file
BIN
app/libs/TopOnLibrary_06_27_16_00-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.
@ -6,7 +6,7 @@
|
|||||||
<uses-permission
|
<uses-permission
|
||||||
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
|
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
|
||||||
android:maxSdkVersion="32" />
|
android:maxSdkVersion="32" />
|
||||||
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||||
<application
|
<application
|
||||||
android:name=".BaseApp"
|
android:name=".BaseApp"
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
@ -16,8 +16,21 @@
|
|||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:roundIcon="@mipmap/ic_logo_round"
|
android:roundIcon="@mipmap/ic_logo_round"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
|
android:networkSecurityConfig="@xml/net"
|
||||||
android:theme="@style/Theme.WelWallpaper"
|
android:theme="@style/Theme.WelWallpaper"
|
||||||
tools:targetApi="31">
|
tools:targetApi="31">
|
||||||
|
|
||||||
|
<uses-library android:name="org.apache.http.legacy" android:required="false"/>
|
||||||
|
<!--start.io-->
|
||||||
|
<meta-data
|
||||||
|
android:name="com.startapp.sdk.SPLASH_ENABLED"
|
||||||
|
android:value="false" />
|
||||||
|
|
||||||
|
<!--start.io-->
|
||||||
|
<meta-data
|
||||||
|
android:name="com.startapp.sdk.RETURN_ADS_ENABLED"
|
||||||
|
android:value="false" />
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".uiview.StartActivity"
|
android:name=".uiview.StartActivity"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
|
|||||||
@ -5,9 +5,11 @@ import android.content.Context;
|
|||||||
import android.graphics.Typeface;
|
import android.graphics.Typeface;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
|
import com.ad.toponlibrary.AdManager;
|
||||||
import com.newapp.paperwall.tools.UiUtils;
|
import com.newapp.paperwall.tools.UiUtils;
|
||||||
import com.newapp.paperwall.tools.DbManager;
|
import com.newapp.paperwall.tools.DbManager;
|
||||||
import com.newapp.paperwall.tools.JsonData;
|
import com.newapp.paperwall.tools.JsonData;
|
||||||
|
import com.up.uploadlibrary.UpLoadManager;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
@ -45,6 +47,14 @@ public class BaseApp extends Application {
|
|||||||
executor = Executors.newFixedThreadPool(8);
|
executor = Executors.newFixedThreadPool(8);
|
||||||
String[] names = {wallpaper, animaLs, experiment, film, nature, patterns, street, travel};
|
String[] names = {wallpaper, animaLs, experiment, film, nature, patterns, street, travel};
|
||||||
|
|
||||||
|
|
||||||
|
AdManager.INSTANCE.init(TAG,this,"h6864f450dde68","a34e48689333bd641a1ef97ddf94f97ba",
|
||||||
|
"25e138876a3743aa9037e82dff40dcb657df7a6d",
|
||||||
|
"n6864f4a595d38",
|
||||||
|
"n6864f4a5652a8",
|
||||||
|
"n6864f4a527f58",false);
|
||||||
|
UpLoadManager.INSTANCE.init(this,TAG);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
for (String name : names) {
|
for (String name : names) {
|
||||||
InputStream open = getAssets().open(name);
|
InputStream open = getAssets().open(name);
|
||||||
@ -82,28 +92,4 @@ public class BaseApp 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();
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,6 +8,8 @@ import androidx.appcompat.app.AppCompatActivity;
|
|||||||
import androidx.recyclerview.widget.GridLayoutManager;
|
import androidx.recyclerview.widget.GridLayoutManager;
|
||||||
|
|
||||||
|
|
||||||
|
import com.ad.toponlibrary.AdManager;
|
||||||
|
import com.ad.toponlibrary.onActionListener;
|
||||||
import com.newapp.paperwall.adapter.ThreeLinesAdapter;
|
import com.newapp.paperwall.adapter.ThreeLinesAdapter;
|
||||||
import com.newapp.paperwall.databinding.ActivityCategoryListBinding;
|
import com.newapp.paperwall.databinding.ActivityCategoryListBinding;
|
||||||
import com.newapp.paperwall.javabean.Data;
|
import com.newapp.paperwall.javabean.Data;
|
||||||
@ -33,13 +35,25 @@ public class CategoryListActivity extends AppCompatActivity implements OnItemCli
|
|||||||
categoryName = getIntent().getStringExtra(key_index);
|
categoryName = getIntent().getStringExtra(key_index);
|
||||||
vb.name.setText(categoryName);
|
vb.name.setText(categoryName);
|
||||||
initList();
|
initList();
|
||||||
|
AdManager.loadAllAd();
|
||||||
vb.imageviewBack.setOnClickListener(new View.OnClickListener() {
|
vb.imageviewBack.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
AdManager.showTopOn(CategoryListActivity.this, new onActionListener() {
|
||||||
|
@Override
|
||||||
|
public void onAction() {
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
AdManager.showTopOn(this, new onActionListener() {
|
||||||
|
@Override
|
||||||
|
public void onAction() {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
private void initList() {
|
private void initList() {
|
||||||
List<Data> data = DbManager.queryCategoryAll(categoryName);
|
List<Data> data = DbManager.queryCategoryAll(categoryName);
|
||||||
|
|||||||
@ -15,6 +15,8 @@ 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.toponlibrary.AdManager;
|
||||||
|
import com.ad.toponlibrary.onActionListener;
|
||||||
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;
|
||||||
@ -72,12 +74,20 @@ public class DetailActivity extends AppCompatActivity implements DialogListener
|
|||||||
if (data == null) {
|
if (data == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
AdManager.loadAllAd();
|
||||||
imId = data.getImId();
|
imId = data.getImId();
|
||||||
mSavePath = JsonData.INSTANCE.getSaveFilePath(this, imId);
|
mSavePath = JsonData.INSTANCE.getSaveFilePath(this, imId);
|
||||||
wallpaperManager = WallpaperManager.getInstance(this);
|
wallpaperManager = WallpaperManager.getInstance(this);
|
||||||
initClick();
|
initClick();
|
||||||
loadDetail();
|
loadDetail();
|
||||||
vb.tvContent.setText(data.getDescription());
|
vb.tvContent.setText(data.getDescription());
|
||||||
|
|
||||||
|
AdManager.showTopOn(this, new onActionListener() {
|
||||||
|
@Override
|
||||||
|
public void onAction() {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadDetail() {
|
private void loadDetail() {
|
||||||
@ -155,6 +165,11 @@ public class DetailActivity extends AppCompatActivity implements DialogListener
|
|||||||
});
|
});
|
||||||
|
|
||||||
vb.layoutSet.setOnClickListener(v -> {
|
vb.layoutSet.setOnClickListener(v -> {
|
||||||
|
|
||||||
|
|
||||||
|
AdManager.showTopOn(DetailActivity.this, new onActionListener() {
|
||||||
|
@Override
|
||||||
|
public void onAction() {
|
||||||
if (dialogType == null) {
|
if (dialogType == null) {
|
||||||
dialogType = new SettingDialog();
|
dialogType = new SettingDialog();
|
||||||
dialogType.setListener(DetailActivity.this);
|
dialogType.setListener(DetailActivity.this);
|
||||||
@ -162,15 +177,27 @@ public class DetailActivity extends AppCompatActivity implements DialogListener
|
|||||||
if (!dialogType.isAdded()) {
|
if (!dialogType.isAdded()) {
|
||||||
dialogType.show(getSupportFragmentManager(), "");
|
dialogType.show(getSupportFragmentManager(), "");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
vb.imageFavorite.setOnClickListener(v -> {
|
vb.imageFavorite.setOnClickListener(v -> {
|
||||||
|
|
||||||
|
AdManager.showTopOn(DetailActivity.this, new onActionListener() {
|
||||||
|
@Override
|
||||||
|
public void onAction() {
|
||||||
boolean selected = vb.imageFavorite.isSelected();
|
boolean selected = vb.imageFavorite.isSelected();
|
||||||
vb.imageFavorite.setSelected(!selected);
|
vb.imageFavorite.setSelected(!selected);
|
||||||
boolean selectedNew = vb.imageFavorite.isSelected();
|
boolean selectedNew = vb.imageFavorite.isSelected();
|
||||||
data.setLike(selectedNew);
|
data.setLike(selectedNew);
|
||||||
DbManager.updateLike(data);
|
DbManager.updateLike(data);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
vb.layoutDownload.setOnClickListener(v -> {
|
vb.layoutDownload.setOnClickListener(v -> {
|
||||||
@ -178,7 +205,13 @@ public class DetailActivity extends AppCompatActivity implements DialogListener
|
|||||||
if (!permission) {
|
if (!permission) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
AdManager.showTopOn(DetailActivity.this, new onActionListener() {
|
||||||
|
@Override
|
||||||
|
public void onAction() {
|
||||||
startSaveToAlbum();
|
startSaveToAlbum();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -15,6 +15,8 @@ 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.toponlibrary.AdManager;
|
||||||
|
import com.ad.toponlibrary.onActionListener;
|
||||||
import com.newapp.paperwall.BaseApp;
|
import com.newapp.paperwall.BaseApp;
|
||||||
import com.newapp.paperwall.R;
|
import com.newapp.paperwall.R;
|
||||||
import com.newapp.paperwall.adapter.ThreeLinesAdapter;
|
import com.newapp.paperwall.adapter.ThreeLinesAdapter;
|
||||||
@ -39,7 +41,14 @@ public class SearchActivity extends AppCompatActivity implements OnItemClickList
|
|||||||
UiUtils.initFull(this, true);
|
UiUtils.initFull(this, true);
|
||||||
setContentView(vb.getRoot());
|
setContentView(vb.getRoot());
|
||||||
initList();
|
initList();
|
||||||
|
AdManager.loadAllAd();
|
||||||
setBack();
|
setBack();
|
||||||
|
AdManager.showTopOn(this, new onActionListener() {
|
||||||
|
@Override
|
||||||
|
public void onAction() {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -134,7 +143,14 @@ public class SearchActivity extends AppCompatActivity implements OnItemClickList
|
|||||||
|
|
||||||
private void setBack() {
|
private void setBack() {
|
||||||
vb.imgBack.setOnClickListener(v -> {
|
vb.imgBack.setOnClickListener(v -> {
|
||||||
|
|
||||||
|
AdManager.showTopOn(SearchActivity.this, new onActionListener() {
|
||||||
|
@Override
|
||||||
|
public void onAction() {
|
||||||
finish();
|
finish();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -7,15 +7,20 @@ import android.os.CountDownTimer;
|
|||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
import com.ad.toponlibrary.AdManager;
|
||||||
import com.newapp.paperwall.databinding.ActivityStartBinding;
|
import com.newapp.paperwall.databinding.ActivityStartBinding;
|
||||||
import com.newapp.paperwall.tools.UiUtils;
|
import com.newapp.paperwall.tools.UiUtils;
|
||||||
|
|
||||||
|
import kotlin.Unit;
|
||||||
|
import kotlin.jvm.functions.Function0;
|
||||||
|
import kotlin.jvm.functions.Function1;
|
||||||
|
|
||||||
public class StartActivity extends AppCompatActivity {
|
public class StartActivity extends AppCompatActivity {
|
||||||
|
|
||||||
private CountDownTimer countDownTimer;
|
private CountDownTimer countDownTimer;
|
||||||
private ActivityStartBinding vb;
|
private ActivityStartBinding vb;
|
||||||
|
|
||||||
private long totalTime = 1600;
|
private long totalTime = 12000;
|
||||||
|
|
||||||
@SuppressLint("MissingInflatedId")
|
@SuppressLint("MissingInflatedId")
|
||||||
@Override
|
@Override
|
||||||
@ -25,43 +30,25 @@ public class StartActivity extends AppCompatActivity {
|
|||||||
UiUtils.initFull(this,true);
|
UiUtils.initFull(this,true);
|
||||||
setContentView(vb.getRoot());
|
setContentView(vb.getRoot());
|
||||||
|
|
||||||
|
countDownTimer = AdManager.showWelcomeAd(this, totalTime, new Function1<Long, Unit>() {
|
||||||
countDownTimer = new CountDownTimer(totalTime,100) {
|
|
||||||
@Override
|
@Override
|
||||||
public void onTick(long millisUntilFinished) {
|
public Unit invoke(Long aLong) {
|
||||||
int progressPercentage = (int) ((100 * millisUntilFinished) / totalTime);
|
int progressPercentage = (int) ((100 * aLong) / totalTime);
|
||||||
|
|
||||||
int countdownPercentage = 100 - progressPercentage;
|
int countdownPercentage = 100 - progressPercentage;
|
||||||
vb.progressbar.setProgress(countdownPercentage);
|
vb.progressbar.setProgress(countdownPercentage);
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
}, new Function0<Unit>() {
|
||||||
@Override
|
@Override
|
||||||
public void onFinish() {
|
public Unit invoke() {
|
||||||
vb.progressbar.setProgress(100);
|
vb.progressbar.setProgress(100);
|
||||||
Intent intent = new Intent(StartActivity.this, MainActivity.class);
|
Intent intent = new Intent(StartActivity.this, MainActivity.class);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
finish();
|
finish();
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
};
|
});
|
||||||
|
|
||||||
// countDownTimer = AdManager.showWelcomeAd(this, totalTime, new CountAction() {
|
|
||||||
// @Override
|
|
||||||
// public void onCount(long millisUntilFinished) {
|
|
||||||
// int progressPercentage = (int) ((100 * millisUntilFinished) / totalTime);
|
|
||||||
//
|
|
||||||
// int countdownPercentage = 100 - progressPercentage;
|
|
||||||
//
|
|
||||||
// vb.progressbar.setProgress(countdownPercentage);
|
|
||||||
// }
|
|
||||||
// }, new GoMainAction() {
|
|
||||||
// @Override
|
|
||||||
// public void onGo() {
|
|
||||||
// vb.progressbar.setProgress(100);
|
|
||||||
// Intent intent = new Intent(WElActivity.this, HomeActivity.class);
|
|
||||||
// startActivity(intent);
|
|
||||||
// finish();
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
countDownTimer.start();
|
countDownTimer.start();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
20
app/src/main/res/drawable/splash_pb.xml
Normal file
20
app/src/main/res/drawable/splash_pb.xml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:id="@android:id/background">
|
||||||
|
<shape>
|
||||||
|
<corners android:radius="5dp" />
|
||||||
|
<solid android:color="@color/bg_pb" /> <!-- 背景颜色 -->
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<item android:id="@android:id/progress">
|
||||||
|
<clip>
|
||||||
|
<shape>
|
||||||
|
<corners android:radius="20dp" />
|
||||||
|
<gradient
|
||||||
|
android:startColor="@color/purple_200"
|
||||||
|
android:endColor="@color/purple_500"
|
||||||
|
android:angle="0" />
|
||||||
|
</shape>
|
||||||
|
</clip>
|
||||||
|
</item>
|
||||||
|
</layer-list>
|
||||||
@ -32,16 +32,19 @@
|
|||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
android:id="@+id/progressbar"
|
android:id="@+id/progressbar"
|
||||||
style="?android:attr/progressBarStyleSmall"
|
style="?android:attr/progressBarStyleHorizontal"
|
||||||
android:layout_width="50dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="50dp"
|
android:layout_height="5dp"
|
||||||
|
android:progressDrawable="@drawable/splash_pb"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:layout_marginBottom="140dp"
|
android:layout_marginBottom="40dp"
|
||||||
android:max="100"
|
android:max="100"
|
||||||
android:progress="80"
|
android:layout_marginStart = "25dp"
|
||||||
android:indeterminateTint="#FFB6C1"
|
android:layout_marginEnd = "25dp"
|
||||||
android:progressDrawable="@drawable/welcome_pb" />
|
android:progress="1"
|
||||||
|
android:indeterminateTint="#FFB6C1" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
@ -7,4 +7,5 @@
|
|||||||
<color name="teal_700">#FF018786</color>
|
<color name="teal_700">#FF018786</color>
|
||||||
<color name="black">#FF000000</color>
|
<color name="black">#FF000000</color>
|
||||||
<color name="white">#FFFFFFFF</color>
|
<color name="white">#FFFFFFFF</color>
|
||||||
|
<color name="bg_pb">#616161</color>
|
||||||
</resources>
|
</resources>
|
||||||
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,6 +2,8 @@
|
|||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.android.application) apply false
|
alias(libs.plugins.android.application) apply false
|
||||||
alias(libs.plugins.kotlin.android) 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 {
|
buildscript {
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
[versions]
|
[versions]
|
||||||
agp = "8.10.1"
|
agp = "8.6.0"
|
||||||
blurview = "2.0.6"
|
blurview = "2.0.6"
|
||||||
glide = "4.15.1"
|
glide = "4.15.1"
|
||||||
compiler = "4.15.1"
|
compiler = "4.15.1"
|
||||||
|
|||||||
@ -16,6 +16,25 @@ dependencyResolutionManagement {
|
|||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
|
||||||
|
//TU(Core)
|
||||||
|
maven ( "https://jfrog.anythinktech.com/artifactory/overseas_sdk")
|
||||||
|
|
||||||
|
//Ironsource
|
||||||
|
maven ( "https://android-sdk.is.com/")
|
||||||
|
|
||||||
|
//Pangle
|
||||||
|
maven ("https://artifact.bytedance.com/repository/pangle")
|
||||||
|
|
||||||
|
//Mintegral
|
||||||
|
maven ("https://dl-maven-android.mintegral.com/repository/mbridge_android_sdk_oversea")
|
||||||
|
|
||||||
|
//Chartboost
|
||||||
|
maven ( "https://cboost.jfrog.io/artifactory/chartboost-ads")
|
||||||
|
maven ("https://cboost.jfrog.io/artifactory/chartboost-mediation")
|
||||||
|
|
||||||
|
//TopOn集成测试工具
|
||||||
|
maven ( "https://jfrog.anythinktech.com/artifactory/debugger")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user