Max移除 1.0.1(2)
This commit is contained in:
parent
31ad3ca14c
commit
7c34021efd
1
.gitignore
vendored
1
.gitignore
vendored
@ -8,3 +8,4 @@ local.properties
|
|||||||
.safedk/
|
.safedk/
|
||||||
.idea/
|
.idea/
|
||||||
.gradle/
|
.gradle/
|
||||||
|
app/build/
|
||||||
|
|||||||
@ -3,21 +3,17 @@ import java.text.SimpleDateFormat
|
|||||||
plugins {
|
plugins {
|
||||||
id("com.android.application")
|
id("com.android.application")
|
||||||
id("org.jetbrains.kotlin.android")
|
id("org.jetbrains.kotlin.android")
|
||||||
id("com.google.gms.google-services")
|
|
||||||
id("com.google.firebase.crashlytics")
|
id("com.google.firebase.crashlytics")
|
||||||
id("applovin-quality-service")
|
|
||||||
}
|
|
||||||
applovin{
|
|
||||||
apiKey = "rocvFTS3NWAipuv92m3QDkFeuB8V2Gf9__QrXPB6gIDTqwL4XD81hdZRKDu1hJvMh4gOJCa5dmHRc06wHThQgq"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
val timestamp = SimpleDateFormat("MM_dd_HH_mm").format(Date())
|
val timestamp = SimpleDateFormat("MM_dd_HH_mm").format(Date())
|
||||||
android {
|
android {
|
||||||
namespace = "com.exquisite.demo08"
|
namespace = "com.exquisite.demo08"
|
||||||
compileSdk = 34
|
compileSdk = 34
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId = "com.key.keyboardskins"
|
applicationId = "com.key.keyboardskins.test"
|
||||||
minSdk = 23
|
minSdk = 23
|
||||||
targetSdk = 34
|
targetSdk = 34
|
||||||
versionCode = 2
|
versionCode = 2
|
||||||
@ -59,8 +55,6 @@ dependencies {
|
|||||||
implementation("com.google.firebase:firebase-analytics-ktx")
|
implementation("com.google.firebase:firebase-analytics-ktx")
|
||||||
implementation ("com.google.firebase:firebase-crashlytics-ktx")
|
implementation ("com.google.firebase:firebase-crashlytics-ktx")
|
||||||
|
|
||||||
implementation("com.applovin:applovin-sdk:+")
|
|
||||||
implementation("com.applovin.mediation:vungle-adapter:+")
|
|
||||||
implementation("com.applovin.mediation:bytedance-adapter:+")
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1,29 +0,0 @@
|
|||||||
{
|
|
||||||
"project_info": {
|
|
||||||
"project_number": "587788974322",
|
|
||||||
"project_id": "keyboard-skins-51667",
|
|
||||||
"storage_bucket": "keyboard-skins-51667.appspot.com"
|
|
||||||
},
|
|
||||||
"client": [
|
|
||||||
{
|
|
||||||
"client_info": {
|
|
||||||
"mobilesdk_app_id": "1:587788974322:android:4bc75ccf9954f4ab3c786b",
|
|
||||||
"android_client_info": {
|
|
||||||
"package_name": "com.key.keyboardskins"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"oauth_client": [],
|
|
||||||
"api_key": [
|
|
||||||
{
|
|
||||||
"current_key": "AIzaSyCHtBPf_2Yd1pOivx338mY74-w1lri1LkQ"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"services": {
|
|
||||||
"appinvite_service": {
|
|
||||||
"other_platform_oauth_client": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"configuration_version": "1"
|
|
||||||
}
|
|
||||||
@ -8,13 +8,7 @@ import android.widget.Toast;
|
|||||||
|
|
||||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
||||||
|
|
||||||
import com.applovin.sdk.AppLovinMediationProvider;
|
|
||||||
import com.applovin.sdk.AppLovinSdk;
|
|
||||||
import com.applovin.sdk.AppLovinSdk.SdkInitializationListener;
|
|
||||||
import com.applovin.sdk.AppLovinSdkConfiguration;
|
|
||||||
import com.applovin.sdk.AppLovinSdkInitializationConfiguration;
|
|
||||||
import com.bytedance.sdk.openadsdk.InitConfig;
|
|
||||||
import com.exquisite.activity.MainActivity;
|
|
||||||
import com.exquisite.data.Mydata;
|
import com.exquisite.data.Mydata;
|
||||||
import com.exquisite.tools.Mytools;
|
import com.exquisite.tools.Mytools;
|
||||||
|
|
||||||
@ -34,7 +28,7 @@ public class KeyboardSkin extends Application {
|
|||||||
super.onCreate();
|
super.onCreate();
|
||||||
context = getApplicationContext();
|
context = getApplicationContext();
|
||||||
app = this;
|
app = this;
|
||||||
initSDK();
|
// initSDK();
|
||||||
List<Mydata> myData = Mytools.parseJsonToList("keyboard.json");
|
List<Mydata> myData = Mytools.parseJsonToList("keyboard.json");
|
||||||
myDataArrayList = myData;
|
myDataArrayList = myData;
|
||||||
}
|
}
|
||||||
@ -53,19 +47,19 @@ public class KeyboardSkin extends Application {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initSDK() {
|
// private void initSDK() {
|
||||||
AppLovinSdkInitializationConfiguration initConfig = AppLovinSdkInitializationConfiguration.builder(MAX_SDK, this)
|
// AppLovinSdkInitializationConfiguration initConfig = AppLovinSdkInitializationConfiguration.builder(MAX_SDK, this)
|
||||||
.setMediationProvider(AppLovinMediationProvider.MAX)
|
// .setMediationProvider(AppLovinMediationProvider.MAX)
|
||||||
.build();
|
// .build();
|
||||||
AppLovinSdk.getInstance(this).initialize(initConfig, new SdkInitializationListener() {
|
// AppLovinSdk.getInstance(this).initialize(initConfig, new SdkInitializationListener() {
|
||||||
@Override
|
// @Override
|
||||||
public void onSdkInitialized(AppLovinSdkConfiguration appLovinSdkConfiguration) {
|
// public void onSdkInitialized(AppLovinSdkConfiguration appLovinSdkConfiguration) {
|
||||||
initSDK = true;
|
// initSDK = true;
|
||||||
LocalBroadcastManager.getInstance(context).sendBroadcast(new Intent(AD_BROADCAST));
|
// LocalBroadcastManager.getInstance(context).sendBroadcast(new Intent(AD_BROADCAST));
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
AppLovinSdk.getInstance(this).getSettings().setVerboseLogging(true);
|
// AppLovinSdk.getInstance(this).getSettings().setVerboseLogging(true);
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,9 +14,7 @@ import android.util.Log;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
|
|
||||||
import com.applovin.mediation.MaxAd;
|
|
||||||
import com.applovin.mediation.ads.MaxInterstitialAd;
|
|
||||||
import com.exquisite.callback.AdCallback;
|
|
||||||
import com.exquisite.fragment.AllFragment;
|
import com.exquisite.fragment.AllFragment;
|
||||||
import com.exquisite.demo08.R;
|
import com.exquisite.demo08.R;
|
||||||
import com.exquisite.tools.Mytools;
|
import com.exquisite.tools.Mytools;
|
||||||
@ -25,7 +23,7 @@ import java.util.List;
|
|||||||
|
|
||||||
public class AllActivity extends AppCompatActivity implements View.OnClickListener {
|
public class AllActivity extends AppCompatActivity implements View.OnClickListener {
|
||||||
private LinearLayout back;
|
private LinearLayout back;
|
||||||
private static List<MaxInterstitialAd> adsList;
|
// private static List<MaxInterstitialAd> adsList;
|
||||||
|
|
||||||
@SuppressLint("MissingInflatedId")
|
@SuppressLint("MissingInflatedId")
|
||||||
@Override
|
@Override
|
||||||
@ -43,7 +41,7 @@ public class AllActivity extends AppCompatActivity implements View.OnClickListen
|
|||||||
FragmentTransaction transaction = fragmentManager.beginTransaction();
|
FragmentTransaction transaction = fragmentManager.beginTransaction();
|
||||||
transaction.add(R.id.all_activity_fragment, fragment);
|
transaction.add(R.id.all_activity_fragment, fragment);
|
||||||
transaction.commit();
|
transaction.commit();
|
||||||
adsList = Mytools.getAllAd();
|
// adsList = Mytools.getAllAd();
|
||||||
intView();
|
intView();
|
||||||
intEvent();
|
intEvent();
|
||||||
}
|
}
|
||||||
@ -60,33 +58,33 @@ public class AllActivity extends AppCompatActivity implements View.OnClickListen
|
|||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
if (v.getId() == R.id.back) {
|
if (v.getId() == R.id.back) {
|
||||||
showAd();
|
// showAd();
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showAd() {
|
// private void showAd() {
|
||||||
MaxInterstitialAd cachedAd = Mytools.onCache(adsList);
|
// MaxInterstitialAd cachedAd = Mytools.onCache(adsList);
|
||||||
if (cachedAd == null) {
|
// if (cachedAd == null) {
|
||||||
} else {
|
// } else {
|
||||||
Mytools.setADCAllBack(cachedAd, new AdCallback() {
|
// Mytools.setADCAllBack(cachedAd, new AdCallback() {
|
||||||
@Override
|
// @Override
|
||||||
public void onShowFail(MaxAd ad) {
|
// public void onShowFail(MaxAd ad) {
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void onAdHidden() {
|
// public void onAdHidden() {
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
cachedAd.showAd(this);
|
// cachedAd.showAd(this);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBackPressed() {
|
public void onBackPressed() {
|
||||||
super.onBackPressed();
|
super.onBackPressed();
|
||||||
showAd();
|
// showAd();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -23,14 +23,12 @@ import android.widget.ProgressBar;
|
|||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import com.applovin.mediation.MaxAd;
|
|
||||||
import com.applovin.mediation.ads.MaxInterstitialAd;
|
|
||||||
import com.bumptech.glide.Glide;
|
import com.bumptech.glide.Glide;
|
||||||
import com.bumptech.glide.request.target.CustomTarget;
|
import com.bumptech.glide.request.target.CustomTarget;
|
||||||
import com.bumptech.glide.request.transition.Transition;
|
import com.bumptech.glide.request.transition.Transition;
|
||||||
import com.exquisite.KeyboardSkin;
|
import com.exquisite.KeyboardSkin;
|
||||||
import com.exquisite.adapter.ThumAdapter;
|
import com.exquisite.adapter.ThumAdapter;
|
||||||
import com.exquisite.callback.AdCallback;
|
|
||||||
import com.exquisite.callback.DownloadCallback;
|
import com.exquisite.callback.DownloadCallback;
|
||||||
import com.exquisite.callback.UnzipCallback;
|
import com.exquisite.callback.UnzipCallback;
|
||||||
import com.exquisite.data.StaticValue;
|
import com.exquisite.data.StaticValue;
|
||||||
@ -54,7 +52,7 @@ public class PreviewActivity extends AppCompatActivity implements View.OnClickLi
|
|||||||
private ProgressBar progressBarPreview;
|
private ProgressBar progressBarPreview;
|
||||||
|
|
||||||
private ProgressBar progressBarDownload;
|
private ProgressBar progressBarDownload;
|
||||||
private static List<MaxInterstitialAd> adsList;
|
// private static List<MaxInterstitialAd> adsList;
|
||||||
|
|
||||||
@SuppressLint("MissingInflatedId")
|
@SuppressLint("MissingInflatedId")
|
||||||
@Override
|
@Override
|
||||||
@ -69,7 +67,7 @@ public class PreviewActivity extends AppCompatActivity implements View.OnClickLi
|
|||||||
});
|
});
|
||||||
|
|
||||||
intView();
|
intView();
|
||||||
adsList = Mytools.getAllAd();
|
// adsList = Mytools.getAllAd();
|
||||||
imageView.setVisibility(View.GONE);
|
imageView.setVisibility(View.GONE);
|
||||||
progressBarPreview.setVisibility(View.VISIBLE);
|
progressBarPreview.setVisibility(View.VISIBLE);
|
||||||
progressBarDownload.setVisibility(View.GONE);
|
progressBarDownload.setVisibility(View.GONE);
|
||||||
@ -152,7 +150,7 @@ public class PreviewActivity extends AppCompatActivity implements View.OnClickLi
|
|||||||
StaticValue.PATH = resDirPath;
|
StaticValue.PATH = resDirPath;
|
||||||
Toast.makeText(PreviewActivity.this, getString(R.string.set_successful), Toast.LENGTH_SHORT).show();
|
Toast.makeText(PreviewActivity.this, getString(R.string.set_successful), Toast.LENGTH_SHORT).show();
|
||||||
progressBarDownload.setVisibility(View.GONE);
|
progressBarDownload.setVisibility(View.GONE);
|
||||||
showAd();
|
// showAd();
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -161,23 +159,23 @@ public class PreviewActivity extends AppCompatActivity implements View.OnClickLi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showAd() {
|
// private void showAd() {
|
||||||
MaxInterstitialAd cachedAd = Mytools.onCache(adsList);
|
// MaxInterstitialAd cachedAd = Mytools.onCache(adsList);
|
||||||
if (cachedAd == null) {
|
// if (cachedAd == null) {
|
||||||
|
//
|
||||||
} else {
|
// } else {
|
||||||
Mytools.setADCAllBack(cachedAd, new AdCallback() {
|
// Mytools.setADCAllBack(cachedAd, new AdCallback() {
|
||||||
@Override
|
// @Override
|
||||||
public void onShowFail(MaxAd ad) {
|
// public void onShowFail(MaxAd ad) {
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void onAdHidden() {
|
// public void onAdHidden() {
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
cachedAd.showAd();
|
// cachedAd.showAd();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
@ -17,10 +17,6 @@ import android.os.CountDownTimer;
|
|||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
import com.applovin.mediation.MaxAd;
|
|
||||||
import com.applovin.mediation.ads.MaxInterstitialAd;
|
|
||||||
import com.exquisite.KeyboardSkin;
|
|
||||||
import com.exquisite.callback.AdCallback;
|
|
||||||
import com.exquisite.demo08.R;
|
import com.exquisite.demo08.R;
|
||||||
import com.exquisite.tools.Mytools;
|
import com.exquisite.tools.Mytools;
|
||||||
|
|
||||||
@ -30,7 +26,7 @@ public class SplashActivity extends AppCompatActivity {
|
|||||||
private CountDownTimer countDownTimer;
|
private CountDownTimer countDownTimer;
|
||||||
private boolean needShow = true;
|
private boolean needShow = true;
|
||||||
private boolean key = true;
|
private boolean key = true;
|
||||||
private static List<MaxInterstitialAd> adsList;
|
// private static List<MaxInterstitialAd> adsList;
|
||||||
|
|
||||||
@SuppressLint("MissingInflatedId")
|
@SuppressLint("MissingInflatedId")
|
||||||
@Override
|
@Override
|
||||||
@ -44,53 +40,67 @@ public class SplashActivity extends AppCompatActivity {
|
|||||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||||
return insets;
|
return insets;
|
||||||
});
|
});
|
||||||
initializeCountDownTimer();
|
countDownTimer = new CountDownTimer(1000, 100) {
|
||||||
loadAndStartAd();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void initializeCountDownTimer() {
|
|
||||||
countDownTimer = new CountDownTimer(11000, 1000) {
|
|
||||||
@Override
|
@Override
|
||||||
public void onTick(long millisUntilFinished) {
|
public void onTick(long l) {
|
||||||
if (!key) {
|
|
||||||
showAdOrStartView();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFinish() {
|
public void onFinish() {
|
||||||
if (key) {
|
|
||||||
showAdOrStartView();
|
|
||||||
}
|
|
||||||
startView();
|
startView();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
registerBroadcastReceiver();
|
countDownTimer.start();
|
||||||
|
// initializeCountDownTimer();
|
||||||
|
// loadAndStartAd();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showAdOrStartView() {
|
// private void initializeCountDownTimer() {
|
||||||
MaxInterstitialAd cachedAd = Mytools.onCache(adsList);
|
// countDownTimer = new CountDownTimer(1000, 100) {
|
||||||
if (cachedAd == null) {
|
// @Override
|
||||||
key = false;
|
// public void onTick(long millisUntilFinished) {
|
||||||
startView();
|
// if (!key) {
|
||||||
} else {
|
// showAdOrStartView();
|
||||||
key = true;
|
// }
|
||||||
needShow = false;
|
// }
|
||||||
Mytools.setADCAllBack(cachedAd, new AdCallback() {
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void onShowFail(MaxAd ad) {
|
// public void onFinish() {
|
||||||
startView();
|
// if (key) {
|
||||||
}
|
// showAdOrStartView();
|
||||||
|
// }
|
||||||
|
// startView();
|
||||||
|
// startView();
|
||||||
|
// }
|
||||||
|
// };
|
||||||
|
// countDownTimer.start();
|
||||||
|
// registerBroadcastReceiver();
|
||||||
|
// }
|
||||||
|
|
||||||
@Override
|
// private void showAdOrStartView() {
|
||||||
public void onAdHidden() {
|
// MaxInterstitialAd cachedAd = Mytools.onCache(adsList);
|
||||||
startView();
|
// if (cachedAd == null) {
|
||||||
|
// key = false;
|
||||||
}
|
// startView();
|
||||||
});
|
// } else {
|
||||||
cachedAd.showAd();
|
// key = true;
|
||||||
}
|
// needShow = false;
|
||||||
}
|
// Mytools.setADCAllBack(cachedAd, new AdCallback() {
|
||||||
|
// @Override
|
||||||
|
// public void onShowFail(MaxAd ad) {
|
||||||
|
// startView();
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void onAdHidden() {
|
||||||
|
// startView();
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// cachedAd.showAd();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
private void startView() {
|
private void startView() {
|
||||||
Intent intent = new Intent(SplashActivity.this, MainActivity.class);
|
Intent intent = new Intent(SplashActivity.this, MainActivity.class);
|
||||||
@ -98,25 +108,25 @@ public class SplashActivity extends AppCompatActivity {
|
|||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadAndStartAd() {
|
// private void loadAndStartAd() {
|
||||||
adsList = Mytools.getAllAd();
|
// adsList = Mytools.getAllAd();
|
||||||
countDownTimer.start();
|
// countDownTimer.start();
|
||||||
}
|
// }
|
||||||
|
|
||||||
private void registerBroadcastReceiver() {
|
// private void registerBroadcastReceiver() {
|
||||||
if (!KeyboardSkin.initSDK) {
|
// if (!KeyboardSkin.initSDK) {
|
||||||
BroadcastReceiver receiver = new BroadcastReceiver() {
|
// BroadcastReceiver receiver = new BroadcastReceiver() {
|
||||||
@Override
|
// @Override
|
||||||
public void onReceive(Context context, Intent intent) {
|
// public void onReceive(Context context, Intent intent) {
|
||||||
loadAndStartAd();
|
// loadAndStartAd();
|
||||||
}
|
// }
|
||||||
};
|
// };
|
||||||
|
//
|
||||||
LocalBroadcastManager.getInstance(this).registerReceiver(receiver, new IntentFilter(KeyboardSkin.AD_BROADCAST));
|
// LocalBroadcastManager.getInstance(this).registerReceiver(receiver, new IntentFilter(KeyboardSkin.AD_BROADCAST));
|
||||||
} else {
|
// } else {
|
||||||
loadAndStartAd();
|
// loadAndStartAd();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onDestroy() {
|
protected void onDestroy() {
|
||||||
|
|||||||
@ -1,8 +0,0 @@
|
|||||||
package com.exquisite.callback;
|
|
||||||
|
|
||||||
import com.applovin.mediation.MaxAd;
|
|
||||||
|
|
||||||
public interface AdCallback {
|
|
||||||
void onShowFail(MaxAd ad);
|
|
||||||
void onAdHidden( );
|
|
||||||
}
|
|
||||||
@ -18,17 +18,13 @@ import android.widget.Toast;
|
|||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import com.applovin.mediation.MaxAd;
|
|
||||||
import com.applovin.mediation.MaxAdListener;
|
|
||||||
import com.applovin.mediation.MaxError;
|
|
||||||
import com.applovin.mediation.ads.MaxInterstitialAd;
|
|
||||||
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.engine.GlideException;
|
import com.bumptech.glide.load.engine.GlideException;
|
||||||
import com.bumptech.glide.request.RequestListener;
|
import com.bumptech.glide.request.RequestListener;
|
||||||
import com.bumptech.glide.request.target.Target;
|
import com.bumptech.glide.request.target.Target;
|
||||||
import com.exquisite.KeyboardSkin;
|
import com.exquisite.KeyboardSkin;
|
||||||
import com.exquisite.callback.AdCallback;
|
|
||||||
import com.exquisite.callback.DownloadCallback;
|
import com.exquisite.callback.DownloadCallback;
|
||||||
import com.exquisite.callback.UnzipCallback;
|
import com.exquisite.callback.UnzipCallback;
|
||||||
import com.exquisite.data.Mydata;
|
import com.exquisite.data.Mydata;
|
||||||
@ -60,78 +56,78 @@ import java.util.List;
|
|||||||
|
|
||||||
public class Mytools {
|
public class Mytools {
|
||||||
private static InputMethodManager methodManager = (InputMethodManager) KeyboardSkin.app.getSystemService(Context.INPUT_METHOD_SERVICE);
|
private static InputMethodManager methodManager = (InputMethodManager) KeyboardSkin.app.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||||
private static ArrayList<MaxInterstitialAd> adArrayList;
|
// private static ArrayList<MaxInterstitialAd> adArrayList;
|
||||||
private static final String one_AD = "37dcb994d4988394";
|
private static final String one_AD = "37dcb994d4988394";
|
||||||
private static final String two_Ad = "a77c5657a94cbb64";
|
private static final String two_Ad = "a77c5657a94cbb64";
|
||||||
private static final String three_ad = "b3a3acdefa7117ff";
|
private static final String three_ad = "b3a3acdefa7117ff";
|
||||||
|
|
||||||
public static void setADCAllBack(MaxInterstitialAd ad, AdCallback adCallback) {
|
// public static void setADCAllBack(MaxInterstitialAd ad, AdCallback adCallback) {
|
||||||
ad.setListener(new MaxAdListener() {
|
// ad.setListener(new MaxAdListener() {
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void onAdHidden(@NonNull MaxAd maxAd) {
|
// public void onAdHidden(@NonNull MaxAd maxAd) {
|
||||||
adCallback.onAdHidden();
|
// adCallback.onAdHidden();
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void onAdDisplayFailed(@NonNull MaxAd maxAd, @NonNull MaxError maxError) {
|
// public void onAdDisplayFailed(@NonNull MaxAd maxAd, @NonNull MaxError maxError) {
|
||||||
adCallback.onShowFail(maxAd);
|
// adCallback.onShowFail(maxAd);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void onAdLoaded(@NonNull MaxAd maxAd) {
|
// public void onAdLoaded(@NonNull MaxAd maxAd) {
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void onAdDisplayed(@NonNull MaxAd maxAd) {
|
// public void onAdDisplayed(@NonNull MaxAd maxAd) {
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void onAdClicked(@NonNull MaxAd maxAd) {
|
// public void onAdClicked(@NonNull MaxAd maxAd) {
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void onAdLoadFailed(@NonNull String s, @NonNull MaxError maxError) {
|
// public void onAdLoadFailed(@NonNull String s, @NonNull MaxError maxError) {
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
});
|
// });
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
public static MaxInterstitialAd onCache(List<MaxInterstitialAd> list) {
|
// public static MaxInterstitialAd onCache(List<MaxInterstitialAd> list) {
|
||||||
Collections.shuffle(list);
|
// Collections.shuffle(list);
|
||||||
for (MaxInterstitialAd ad : list) {
|
// for (MaxInterstitialAd ad : list) {
|
||||||
if (ad.isReady()) {
|
// if (ad.isReady()) {
|
||||||
return ad;
|
// return ad;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
return null;
|
// return null;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
public static List<MaxInterstitialAd> getAllAd() {
|
// public static List<MaxInterstitialAd> getAllAd() {
|
||||||
if (adArrayList == null) {
|
// if (adArrayList == null) {
|
||||||
adArrayList = new ArrayList<>();
|
// adArrayList = new ArrayList<>();
|
||||||
adArrayList.add(createAd(one_AD, KeyboardSkin.app));
|
// adArrayList.add(createAd(one_AD, KeyboardSkin.app));
|
||||||
adArrayList.add(createAd(two_Ad, KeyboardSkin.app));
|
// adArrayList.add(createAd(two_Ad, KeyboardSkin.app));
|
||||||
adArrayList.add(createAd(three_ad, KeyboardSkin.app));
|
// adArrayList.add(createAd(three_ad, KeyboardSkin.app));
|
||||||
}
|
// }
|
||||||
for (MaxInterstitialAd ad : adArrayList) {
|
// for (MaxInterstitialAd ad : adArrayList) {
|
||||||
if (!ad.isReady()) {
|
// if (!ad.isReady()) {
|
||||||
ad.loadAd();
|
// ad.loadAd();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
return adArrayList;
|
// return adArrayList;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
private static MaxInterstitialAd createAd(String adUnitId, Context context) {
|
// private static MaxInterstitialAd createAd(String adUnitId, Context context) {
|
||||||
MaxInterstitialAd ad = new MaxInterstitialAd(adUnitId, context);
|
// MaxInterstitialAd ad = new MaxInterstitialAd(adUnitId, context);
|
||||||
ad.loadAd();
|
// ad.loadAd();
|
||||||
return ad;
|
// return ad;
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
public static StateListDrawable getStatus(Drawable draw, Drawable drawPress) {
|
public static StateListDrawable getStatus(Drawable draw, Drawable drawPress) {
|
||||||
|
|||||||
@ -3,12 +3,4 @@ plugins {
|
|||||||
id("com.android.application") version "8.1.3" apply false
|
id("com.android.application") version "8.1.3" apply false
|
||||||
id("org.jetbrains.kotlin.android") version "1.7.0" apply false
|
id("org.jetbrains.kotlin.android") version "1.7.0" apply false
|
||||||
id ("com.google.firebase.crashlytics") version "2.9.2" apply false
|
id ("com.google.firebase.crashlytics") version "2.9.2" apply false
|
||||||
id("com.google.gms.google-services") version "4.3.15" apply false
|
|
||||||
}
|
}
|
||||||
buildscript{
|
|
||||||
|
|
||||||
|
|
||||||
dependencies{
|
|
||||||
classpath("com.applovin.quality:AppLovinQualityServiceGradlePlugin:+")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -4,7 +4,6 @@ pluginManagement {
|
|||||||
mavenCentral()
|
mavenCentral()
|
||||||
gradlePluginPortal()
|
gradlePluginPortal()
|
||||||
|
|
||||||
maven{url = uri("https://artifacts.applovin.com/android")}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dependencyResolutionManagement {
|
dependencyResolutionManagement {
|
||||||
@ -12,9 +11,7 @@ dependencyResolutionManagement {
|
|||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
|
||||||
maven("https://jitpack.io")
|
maven("https://jitpack.io")
|
||||||
maven ("https://artifact.bytedance.com/repository/pangle")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user