Skip to content

Commit

Permalink
Bug Fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
AtikulSoftware committed Mar 8, 2024
1 parent e4207d9 commit 6200c53
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 11 deletions.
Binary file modified SmartAdmob-release.aar
Binary file not shown.
2 changes: 1 addition & 1 deletion SmartAdmob/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ publishing {
maven(MavenPublication) {
groupId = 'com.github.AtikulSoftware'
artifactId = 'SmartAdmob'
version = "3.0"
version = "4.0"
pom {
description = 'Smart Admob Library'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ public AdmobAd() {
public AdmobAd initializeAdmobAd() {
if (AdmobAdUnit.ADMOB_AD_IS_ON) {
MobileAds.initialize(activity, initializationStatus -> {
admobAdCallBack.adInitialize(initializationStatus);
});
}
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ default void onAdLoaded() {}

default void onAdOpened() {}

default void adInitialize(InitializationStatus initializationStatus) {}

// Interstitial Ad
default void onAdLoaded(InterstitialAd interstitialAd){}
default void onAdDismissedFullScreenContent(){}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import android.app.Activity;
import android.util.Log;

import com.google.android.gms.ads.MobileAds;
import com.google.android.ump.ConsentForm;
import com.google.android.ump.ConsentInformation;
import com.google.android.ump.ConsentRequestParameters;
Expand Down Expand Up @@ -55,7 +56,6 @@ private void initializeMobileAdsSdk() {
if (isMobileAdsInitializeCalled.getAndSet(true)) {
return;
}

AdmobAd admobAd = new AdmobAd(activity);
admobAd.initializeAdmobAd();

Expand Down
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ android {
minSdk 19
targetSdk 34
versionCode 1
versionName "3.0"
versionName "4.0"
multiDexEnabled true

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down
11 changes: 8 additions & 3 deletions app/src/main/java/com/bdtopcoder/smartadmob/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,20 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

// set admob ad unit id
AdmobAdUnit.ADMOB_BANNER_AD = "ca-app-pub-3940256099942544/9214589741";

// gdpr msg
GDPR gdpr = new GDPR(this);
gdpr.setGDPR();

// Banner Ad
AdmobAd admobAd = new AdmobAd(this);
admobAd.loadBanner(findViewById(R.id.adLayout));


// sdk initialize
admobAd.initializeAdmobAd();

// Banner Ad
admobAd.loadBanner(findViewById(R.id.adLayout));


}
Expand Down
2 changes: 1 addition & 1 deletion jitpack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ before_install:
- ./scripts/prepareJitpackEnvironment.sh
install:
- FILE="-Dfile=SmartAdmob-release.aar"
- mvn install:install-file $FILE -DgroupId=com.github.AtikulSoftware -DartifactId=SmartAdmob -Dversion=3.0 -Dpackaging=aar -DgeneratePom=true
- mvn install:install-file $FILE -DgroupId=com.github.AtikulSoftware -DartifactId=SmartAdmob -Dversion=4.0 -Dpackaging=aar -DgeneratePom=true
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.AtikulSoftware</groupId>
<artifactId>SmartAdmob</artifactId>
<version>3.0</version>
<version>4.0</version>
<packaging>pom</packaging>
<description>Smart Admob Library</description>
</project>

0 comments on commit 6200c53

Please sign in to comment.