移除Max 1.0.5(6)
This commit is contained in:
parent
321a27f6d5
commit
698ad1202a
@ -1,13 +1,13 @@
|
||||
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
id("applovin-quality-service")
|
||||
id("com.google.gms.google-services")
|
||||
id("com.google.firebase.crashlytics")
|
||||
}
|
||||
applovin{
|
||||
apiKey = "BAorLOnK5J2flG9XoJ_9GHUnqETtkiGRooRrcLMv6NTkcN1TGQblSvTkB4kdKPmVomCyvusXDiNfVk0_eegmSt"
|
||||
// id("applovin-quality-service")
|
||||
// id("com.google.gms.google-services")
|
||||
// id("com.google.firebase.crashlytics")
|
||||
}
|
||||
//applovin{
|
||||
// apiKey = "BAorLOnK5J2flG9XoJ_9GHUnqETtkiGRooRrcLMv6NTkcN1TGQblSvTkB4kdKPmVomCyvusXDiNfVk0_eegmSt"
|
||||
//}
|
||||
android {
|
||||
namespace = "emoticon.wasticker.app"
|
||||
compileSdk = 34
|
||||
@ -63,11 +63,11 @@ dependencies {
|
||||
implementation ("com.google.code.gson:gson:2.10.1")
|
||||
implementation ("com.github.bumptech.glide:glide:4.16.0")
|
||||
|
||||
implementation("com.applovin:applovin-sdk:+")
|
||||
implementation("com.applovin.mediation:vungle-adapter:+")
|
||||
implementation("com.applovin.mediation:bytedance-adapter:+")
|
||||
implementation(platform("com.google.firebase:firebase-bom:32.3.1"))
|
||||
implementation("com.google.firebase:firebase-analytics-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:+")
|
||||
// implementation(platform("com.google.firebase:firebase-bom:32.3.1"))
|
||||
// implementation("com.google.firebase:firebase-analytics-ktx")
|
||||
// implementation ("com.google.firebase:firebase-crashlytics-ktx")
|
||||
|
||||
}
|
||||
@ -1,29 +0,0 @@
|
||||
{
|
||||
"project_info": {
|
||||
"project_number": "584182945186",
|
||||
"project_id": "emoticon-stickers",
|
||||
"storage_bucket": "emoticon-stickers.appspot.com"
|
||||
},
|
||||
"client": [
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:584182945186:android:5014a63b7148356a2d0efb",
|
||||
"android_client_info": {
|
||||
"package_name": "emoticon.wasticker.app"
|
||||
}
|
||||
},
|
||||
"oauth_client": [],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyDNdFQpDcAAo4iSbZyt7KPKTcd3YjC1SzA"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": []
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"configuration_version": "1"
|
||||
}
|
||||
@ -3,8 +3,6 @@ package emoticon.wasticker.app;
|
||||
import android.app.Application;
|
||||
import android.util.Log;
|
||||
|
||||
import com.applovin.sdk.AppLovinSdk;
|
||||
import com.applovin.sdk.AppLovinSdkConfiguration;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
|
||||
|
||||
@ -1,14 +1,12 @@
|
||||
package emoticon.wasticker.app.listener;
|
||||
|
||||
import com.applovin.mediation.MaxAd;
|
||||
import com.applovin.mediation.MaxError;
|
||||
import com.applovin.mediation.ads.MaxInterstitialAd;
|
||||
|
||||
|
||||
public interface AdListener {
|
||||
void onShowFail(MaxAd ad);
|
||||
void onShowSuccess(MaxAd ad);
|
||||
void onHidden( );
|
||||
|
||||
void onLoadFail(String string, MaxError maxError);
|
||||
void onLoadSuccess(MaxAd ad);
|
||||
// void onShowFail(MaxAd ad);
|
||||
// void onShowSuccess(MaxAd ad);
|
||||
// void onHidden( );
|
||||
//
|
||||
// void onLoadFail(String string, MaxError maxError);
|
||||
// void onLoadSuccess(MaxAd ad);
|
||||
}
|
||||
|
||||
@ -4,10 +4,6 @@ import android.app.Activity;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.applovin.mediation.MaxAd;
|
||||
import com.applovin.mediation.MaxAdListener;
|
||||
import com.applovin.mediation.MaxError;
|
||||
import com.applovin.mediation.ads.MaxInterstitialAd;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
@ -23,108 +19,108 @@ public class AdLoad {
|
||||
|
||||
|
||||
|
||||
public static MaxInterstitialAd showMyAd(List<MaxInterstitialAd> ads)
|
||||
{
|
||||
Collections.shuffle(ads);
|
||||
for(int g=0;g<ads.size()-1;g++){
|
||||
MaxInterstitialAd maxInterstitialAd = ads.get(g);
|
||||
if(maxInterstitialAd.isReady()){
|
||||
return maxInterstitialAd;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
// public static MaxInterstitialAd showMyAd(List<MaxInterstitialAd> ads)
|
||||
// {
|
||||
// Collections.shuffle(ads);
|
||||
// for(int g=0;g<ads.size()-1;g++){
|
||||
// MaxInterstitialAd maxInterstitialAd = ads.get(g);
|
||||
// if(maxInterstitialAd.isReady()){
|
||||
// return maxInterstitialAd;
|
||||
// }
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
// public static void setAdShowListener(MaxInterstitialAd ad, AdListener adListener){
|
||||
// ad.setListener(new MaxAdListener() {
|
||||
// @Override
|
||||
// public void onAdLoaded(@NonNull MaxAd maxAd) {
|
||||
// if(adListener != null){
|
||||
// adListener.onLoadSuccess(maxAd);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onAdDisplayed(@NonNull MaxAd maxAd) {
|
||||
//
|
||||
// if(adListener != null){
|
||||
// adListener.onShowSuccess(maxAd);
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onAdHidden(@NonNull MaxAd maxAd) {
|
||||
// if(adListener != null){
|
||||
// adListener.onHidden();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onAdClicked(@NonNull MaxAd maxAd) {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onAdLoadFailed(@NonNull String s, @NonNull MaxError maxError) {
|
||||
// if(adListener != null){
|
||||
// adListener.onLoadFail(s,maxError);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onAdDisplayFailed(@NonNull MaxAd maxAd, @NonNull MaxError maxError) {
|
||||
// if(adListener != null){
|
||||
// adListener.onShowFail(maxAd);
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// }
|
||||
|
||||
public static void setAdShowListener(MaxInterstitialAd ad, AdListener adListener){
|
||||
ad.setListener(new MaxAdListener() {
|
||||
@Override
|
||||
public void onAdLoaded(@NonNull MaxAd maxAd) {
|
||||
if(adListener != null){
|
||||
adListener.onLoadSuccess(maxAd);
|
||||
}
|
||||
}
|
||||
// public static List<MaxInterstitialAd> createAd(Activity mActivity) {
|
||||
// MaxInterstitialAd ad1 = new MaxInterstitialAd(ad_1, mActivity);
|
||||
// MaxInterstitialAd ad2 = new MaxInterstitialAd(ad_2, mActivity);
|
||||
// MaxInterstitialAd ad3 = new MaxInterstitialAd(ad_3, mActivity);
|
||||
// ArrayList<MaxInterstitialAd> ads = new ArrayList<>();
|
||||
// ads.add(ad1);
|
||||
// ads.add(ad2);
|
||||
// ads.add(ad3);
|
||||
// return ads;
|
||||
// }
|
||||
|
||||
@Override
|
||||
public void onAdDisplayed(@NonNull MaxAd maxAd) {
|
||||
|
||||
if(adListener != null){
|
||||
adListener.onShowSuccess(maxAd);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdHidden(@NonNull MaxAd maxAd) {
|
||||
if(adListener != null){
|
||||
adListener.onHidden();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdClicked(@NonNull MaxAd maxAd) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdLoadFailed(@NonNull String s, @NonNull MaxError maxError) {
|
||||
if(adListener != null){
|
||||
adListener.onLoadFail(s,maxError);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdDisplayFailed(@NonNull MaxAd maxAd, @NonNull MaxError maxError) {
|
||||
if(adListener != null){
|
||||
adListener.onShowFail(maxAd);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public static List<MaxInterstitialAd> createAd(Activity mActivity) {
|
||||
MaxInterstitialAd ad1 = new MaxInterstitialAd(ad_1, mActivity);
|
||||
MaxInterstitialAd ad2 = new MaxInterstitialAd(ad_2, mActivity);
|
||||
MaxInterstitialAd ad3 = new MaxInterstitialAd(ad_3, mActivity);
|
||||
ArrayList<MaxInterstitialAd> ads = new ArrayList<>();
|
||||
ads.add(ad1);
|
||||
ads.add(ad2);
|
||||
ads.add(ad3);
|
||||
return ads;
|
||||
}
|
||||
|
||||
private void setAdLoadListener(MaxInterstitialAd ad){
|
||||
ad.setListener(new MaxAdListener() {
|
||||
@Override
|
||||
public void onAdLoaded(@NonNull MaxAd maxAd) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdDisplayed(@NonNull MaxAd maxAd) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdHidden(@NonNull MaxAd maxAd) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdClicked(@NonNull MaxAd maxAd) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdLoadFailed(@NonNull String s, @NonNull MaxError maxError) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdDisplayFailed(@NonNull MaxAd maxAd, @NonNull MaxError maxError) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
// private void setAdLoadListener(MaxInterstitialAd ad){
|
||||
// ad.setListener(new MaxAdListener() {
|
||||
// @Override
|
||||
// public void onAdLoaded(@NonNull MaxAd maxAd) {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onAdDisplayed(@NonNull MaxAd maxAd) {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onAdHidden(@NonNull MaxAd maxAd) {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onAdClicked(@NonNull MaxAd maxAd) {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onAdLoadFailed(@NonNull String s, @NonNull MaxError maxError) {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onAdDisplayFailed(@NonNull MaxAd maxAd, @NonNull MaxError maxError) {
|
||||
//
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// }
|
||||
}
|
||||
|
||||
@ -13,9 +13,7 @@ import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.applovin.mediation.MaxAd;
|
||||
import com.applovin.mediation.MaxError;
|
||||
import com.applovin.mediation.ads.MaxInterstitialAd;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
|
||||
import java.io.File;
|
||||
@ -33,7 +31,7 @@ import emoticon.wasticker.app.manager.SPManager;
|
||||
import emoticon.wasticker.app.manager.Values;
|
||||
import emoticon.wasticker.app.R;
|
||||
|
||||
public class AddActivity extends AppCompatActivity implements DownloadListener, View.OnClickListener, AdListener {
|
||||
public class AddActivity extends AppCompatActivity implements DownloadListener, View.OnClickListener {
|
||||
|
||||
private String zipUrl;
|
||||
private String identifierName;
|
||||
@ -52,7 +50,7 @@ public class AddActivity extends AppCompatActivity implements DownloadListener,
|
||||
|
||||
private TextView addTV;
|
||||
|
||||
private List<MaxInterstitialAd> ads;
|
||||
// private List<MaxInterstitialAd> ads;
|
||||
|
||||
private int type = 0;
|
||||
|
||||
@ -60,8 +58,8 @@ public class AddActivity extends AppCompatActivity implements DownloadListener,
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_add);
|
||||
ads = AdLoad.createAd(AddActivity.this);
|
||||
loadAd();
|
||||
// ads = AdLoad.createAd(AddActivity.this);
|
||||
// loadAd();
|
||||
progressBar = findViewById(R.id.progressbar);
|
||||
backImage = findViewById(R.id.back_im);
|
||||
trayImage = findViewById(R.id.tray_im);
|
||||
@ -93,14 +91,14 @@ public class AddActivity extends AppCompatActivity implements DownloadListener,
|
||||
|
||||
}
|
||||
|
||||
private void loadAd() {
|
||||
for (int i = 0; i < ads.size() ; i++) {
|
||||
MaxInterstitialAd maxInterstitialAd = ads.get(i);
|
||||
AdLoad.setAdShowListener(maxInterstitialAd, AddActivity.this);
|
||||
maxInterstitialAd.loadAd();
|
||||
|
||||
}
|
||||
}
|
||||
// private void loadAd() {
|
||||
// for (int i = 0; i < ads.size() ; i++) {
|
||||
// MaxInterstitialAd maxInterstitialAd = ads.get(i);
|
||||
// AdLoad.setAdShowListener(maxInterstitialAd, AddActivity.this);
|
||||
// maxInterstitialAd.loadAd();
|
||||
//
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
private void initStickerShow() {
|
||||
@ -151,7 +149,8 @@ public class AddActivity extends AppCompatActivity implements DownloadListener,
|
||||
public void onBackPressed() {
|
||||
super.onBackPressed();
|
||||
type = 0;
|
||||
showAd();
|
||||
// TODO: 2024/7/18 action2
|
||||
// showAd();
|
||||
|
||||
}
|
||||
|
||||
@ -160,60 +159,64 @@ public class AddActivity extends AppCompatActivity implements DownloadListener,
|
||||
int id = v.getId();
|
||||
if (id == R.id.back_im) {
|
||||
type = 0;
|
||||
boolean b = showAd();
|
||||
// TODO: 2024/7/18 action2
|
||||
// boolean b = showAd();
|
||||
|
||||
finish();
|
||||
} else if (id == R.id.add_whatsapp_tv) {
|
||||
type = 1;
|
||||
boolean b = showAd();
|
||||
if (!b) {
|
||||
addWhatsApp();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
private boolean showAd() {
|
||||
MaxInterstitialAd maxInterstitialAd = AdLoad.showMyAd(ads);
|
||||
if (maxInterstitialAd != null) {
|
||||
maxInterstitialAd.showAd();
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onShowFail(MaxAd ad) {
|
||||
if(type == 1) {
|
||||
addWhatsApp();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onShowSuccess(MaxAd ad) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHidden() {
|
||||
if(type == 1){
|
||||
loadAd();
|
||||
// TODO: 2024/7/18 action3
|
||||
// boolean b = showAd();
|
||||
// if (!b) {
|
||||
// addWhatsApp();
|
||||
// }
|
||||
addWhatsApp();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadFail(String string, MaxError maxError) {
|
||||
|
||||
}
|
||||
// private boolean showAd() {
|
||||
// MaxInterstitialAd maxInterstitialAd = AdLoad.showMyAd(ads);
|
||||
// if (maxInterstitialAd != null) {
|
||||
// maxInterstitialAd.showAd();
|
||||
// return true;
|
||||
// } else {
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
|
||||
@Override
|
||||
public void onLoadSuccess(MaxAd ad) {
|
||||
|
||||
}
|
||||
// @Override
|
||||
// public void onShowFail(MaxAd ad) {
|
||||
// if(type == 1) {
|
||||
// addWhatsApp();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onShowSuccess(MaxAd ad) {
|
||||
//
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onHidden() {
|
||||
// if(type == 1){
|
||||
// loadAd();
|
||||
// addWhatsApp();
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onLoadFail(String string, MaxError maxError) {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onLoadSuccess(MaxAd ad) {
|
||||
//
|
||||
// }
|
||||
|
||||
private void addWhatsApp() {
|
||||
Intent intent = new Intent();
|
||||
|
||||
@ -7,11 +7,6 @@ import android.os.Bundle;
|
||||
import android.os.CountDownTimer;
|
||||
import android.util.Log;
|
||||
|
||||
import com.applovin.mediation.MaxAd;
|
||||
import com.applovin.mediation.MaxError;
|
||||
import com.applovin.mediation.ads.MaxInterstitialAd;
|
||||
import com.applovin.sdk.AppLovinSdk;
|
||||
import com.applovin.sdk.AppLovinSdkConfiguration;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -21,31 +16,31 @@ import emoticon.wasticker.app.listener.AdListener;
|
||||
import emoticon.wasticker.app.manager.AdLoad;
|
||||
|
||||
|
||||
public class FirstOpenActivity extends AppCompatActivity implements AdListener {
|
||||
public class FirstOpenActivity extends AppCompatActivity {
|
||||
|
||||
|
||||
private CountDownTimer countDownTimer;
|
||||
|
||||
private List<MaxInterstitialAd> ads;
|
||||
// private List<MaxInterstitialAd> ads;
|
||||
|
||||
private boolean hasShow = false;
|
||||
|
||||
private void initSDK() {
|
||||
AppLovinSdk instance = AppLovinSdk.getInstance(this);
|
||||
instance.setMediationProvider("max");
|
||||
instance.initializeSdk(new AppLovinSdk.SdkInitializationListener() {
|
||||
@Override
|
||||
public void onSdkInitialized(AppLovinSdkConfiguration appLovinSdkConfiguration) {
|
||||
countDownTimer.start();
|
||||
ads = AdLoad.createAd(FirstOpenActivity.this);
|
||||
for (int i = 0; i < ads.size() ; i++) {
|
||||
MaxInterstitialAd maxInterstitialAd = ads.get(i);
|
||||
maxInterstitialAd.loadAd();
|
||||
AdLoad.setAdShowListener(maxInterstitialAd, FirstOpenActivity.this);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
// private void initSDK() {
|
||||
// AppLovinSdk instance = AppLovinSdk.getInstance(this);
|
||||
// instance.setMediationProvider("max");
|
||||
// instance.initializeSdk(new AppLovinSdk.SdkInitializationListener() {
|
||||
// @Override
|
||||
// public void onSdkInitialized(AppLovinSdkConfiguration appLovinSdkConfiguration) {
|
||||
// countDownTimer.start();
|
||||
// ads = AdLoad.createAd(FirstOpenActivity.this);
|
||||
// for (int i = 0; i < ads.size() ; i++) {
|
||||
// MaxInterstitialAd maxInterstitialAd = ads.get(i);
|
||||
// maxInterstitialAd.loadAd();
|
||||
// AdLoad.setAdShowListener(maxInterstitialAd, FirstOpenActivity.this);
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
@ -55,62 +50,67 @@ public class FirstOpenActivity extends AppCompatActivity implements AdListener {
|
||||
@Override
|
||||
public void onTick(long millisUntilFinished) {
|
||||
if (!hasShow) {
|
||||
startShow();
|
||||
// TODO: 2024/7/18 action1
|
||||
// startShow();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinish() {
|
||||
if (!hasShow) {
|
||||
MaxInterstitialAd maxInterstitialAd = AdLoad.showMyAd(ads);
|
||||
if (maxInterstitialAd != null) {
|
||||
hasShow = true;
|
||||
AdLoad.setAdShowListener(maxInterstitialAd, new AdListener() {
|
||||
@Override
|
||||
public void onShowFail(MaxAd ad) {
|
||||
goMain();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onShowSuccess(MaxAd ad) {
|
||||
}
|
||||
goMain();
|
||||
|
||||
@Override
|
||||
public void onHidden() {
|
||||
goMain();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadFail(String string, MaxError maxError) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadSuccess(MaxAd ad) {
|
||||
|
||||
}
|
||||
});
|
||||
maxInterstitialAd.showAd();
|
||||
}else {
|
||||
goMain();
|
||||
|
||||
}
|
||||
}
|
||||
// if (!hasShow) {
|
||||
// MaxInterstitialAd maxInterstitialAd = AdLoad.showMyAd(ads);
|
||||
// if (maxInterstitialAd != null) {
|
||||
// hasShow = true;
|
||||
// AdLoad.setAdShowListener(maxInterstitialAd, new AdListener() {
|
||||
// @Override
|
||||
// public void onShowFail(MaxAd ad) {
|
||||
// goMain();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onShowSuccess(MaxAd ad) {
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onHidden() {
|
||||
// goMain();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onLoadFail(String string, MaxError maxError) {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onLoadSuccess(MaxAd ad) {
|
||||
//
|
||||
// }
|
||||
// });
|
||||
// maxInterstitialAd.showAd();
|
||||
// }else {
|
||||
// goMain();
|
||||
//
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
};
|
||||
initSDK();
|
||||
}
|
||||
|
||||
private void startShow() {
|
||||
MaxInterstitialAd maxInterstitialAd = AdLoad.showMyAd(ads);
|
||||
if (maxInterstitialAd != null) {
|
||||
hasShow = true;
|
||||
maxInterstitialAd.showAd();
|
||||
|
||||
}
|
||||
countDownTimer.start();
|
||||
// initSDK();
|
||||
}
|
||||
//
|
||||
// private void startShow() {
|
||||
// MaxInterstitialAd maxInterstitialAd = AdLoad.showMyAd(ads);
|
||||
// if (maxInterstitialAd != null) {
|
||||
// hasShow = true;
|
||||
// maxInterstitialAd.showAd();
|
||||
//
|
||||
// }
|
||||
// }
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
@ -122,38 +122,36 @@ public class FirstOpenActivity extends AppCompatActivity implements AdListener {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void onShowFail(MaxAd ad) {
|
||||
hasShow = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onShowSuccess(MaxAd ad) {
|
||||
hasShow = true;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHidden() {
|
||||
goMain();
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// @Override
|
||||
// public void onShowFail(MaxAd ad) {
|
||||
// hasShow = false;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onShowSuccess(MaxAd ad) {
|
||||
// hasShow = true;
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onHidden() {
|
||||
// goMain();
|
||||
// }
|
||||
//
|
||||
//
|
||||
private void goMain(){
|
||||
Intent intent = new Intent(FirstOpenActivity.this, MainActivity.class);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
}
|
||||
@Override
|
||||
public void onLoadFail(String str, MaxError maxError) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadSuccess(MaxAd ad) {
|
||||
|
||||
}
|
||||
// @Override
|
||||
// public void onLoadFail(String str, MaxError maxError) {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onLoadSuccess(MaxAd ad) {
|
||||
//
|
||||
// }
|
||||
}
|
||||
@ -1,11 +1,11 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
plugins {
|
||||
id("com.android.application") version "8.1.3" apply false
|
||||
id("com.google.gms.google-services") version "4.3.15" 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
|
||||
// id ("com.google.firebase.crashlytics") version "2.9.2" apply false
|
||||
}
|
||||
buildscript{
|
||||
dependencies{
|
||||
classpath("com.applovin.quality:AppLovinQualityServiceGradlePlugin:+")
|
||||
}
|
||||
}
|
||||
//buildscript{
|
||||
// dependencies{
|
||||
// classpath("com.applovin.quality:AppLovinQualityServiceGradlePlugin:+")
|
||||
// }
|
||||
//}
|
||||
@ -3,7 +3,7 @@ pluginManagement {
|
||||
google()
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
maven{url = uri("https://artifacts.applovin.com/android")}
|
||||
// maven{url = uri("https://artifacts.applovin.com/android")}
|
||||
}
|
||||
}
|
||||
dependencyResolutionManagement {
|
||||
@ -11,7 +11,7 @@ dependencyResolutionManagement {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
maven ("https://artifact.bytedance.com/repository/pangle")
|
||||
// maven ("https://artifact.bytedance.com/repository/pangle")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user