diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..ce98559
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,217 @@
+# Change Log
+## 4.8.0 (2022/06/07)
+* Added banner onShow callback
+* Fixed ConcurrentModificationException
+
+## 4.7.1 (2022/03/30)
+* Google Designed For Families (DFF) complaince changes
+* Fix for missing click callback in banner integrations
+
+## 4.7.1 (2022/03/30)
+* Google Designed For Families (DFF) complaince changes
+* Fix for missing click callback in banner integrations
+
+## 4.7.0 (2022/03/10)
+* Changed configure interface, deprecated old one
+* Updated OM SDK to v1.3.30
+* Fixed NullPointerException: Attempt to invoke virtual method
+* Fixed ClassNotFoundException: Didn't find class 'android.webkit.RenderProcessGoneDetail'
+
+## 4.6.5 (2021/10/21)
+* AD_ID permission support for Android 12.
+* Various internal, edge case bugfixes that have not been publicly reported by publishers.
+
+## 4.6.4 (2021/09/15)
+* Improved JSON synchronization to fix edge case ConcurrentModificationException.
+
+## 4.6.3 (2021/08/30)
+* Altered user agent retrieval logic to avoid issues with WebView reported during initialization.
+
+## 4.6.2 (2021/08/23)
+* Fixed NullPointerException exposed in 4.6.0.
+
+## 4.6.1 (2021/08/10)
+* Fix NullPointerException and NoClassDefFoundError exposed by 4.6.0 on devices below API 19.
+
+## 4.6.0 (2021/08/03)
+* Note: Potentially requires Gradle Plugin version updates. See [this blog post](https://android-developers.googleblog.com/2020/07/preparing-your-build-for-package-visibility-in-android-11.html) for more information.
+* Internal communication adjustments to improve CPU usage and battery life
+* Threading optimization to minimize number of concurrent threads and memory usage
+* Additional ad request safety to avoid potential timeouts
+* Fixed issue where interstitial ad show attempts would fail without feedback when a network filter mismatch occurred
+* Added support for app install demand from additional stores
+* Fixed edge case ANR on Unity
+* Fixed edge case ConcurrentModificationException
+* Optimized data returned via collectSignals()
+* Various other bug fixes and performance improvements
+
+## 4.5.0 (2021/04/02)
+* Optimized data returned via collectSignals()
+* Altered session measurement logic to reach parity with iOS.
+* Fixed edge case NoSuchElementException due to thread synchronization issue
+* Fixed edge case Error when clearCustomMessageListeners() is called
+
+## 4.4.1 (2021/01/28)
+* Fixed edge case exception thrown when using asynchronous collectSignals
+
+## 4.4.0 (2021/01/12)
+* Minimized exposure to specific Android APIs through our JavascriptInterface due to policy changes from Google
+* Added asynchronous AdColony.collectSignals() and deprecated synchronous version
+* Various bugfixes
+
+## 4.3.1 (2020/12/08)
+* Added device_audio (boolean) to AdColony.collectSignals() output
+* Fixed exception while clicking on a display ad
+
+## 4.3.0 (2020/10/09)
+* Moved WebView user agent retrieval to background thread.
+* Added logAppOpen() and logAdImpression() methods to AdColonyEventTracker API.
+* Updated OM SDK to v1.3.11
+* Internal optimization of network request timeouts.
+
+## 4.2.4 (2020/09/10)
+* Fixed internal error leading to an issue with our Unity Plugin from v4.2.3.
+
+## 4.2.3 (2020/09/02)
+* Fixed edge case ANR witnessed by some surrounding WebView instantiation.
+
+## 4.2.2 (2020/08/03)
+* Fixed issue with banner clickthroughs under specific circumstances when AdColony is configured with an Application reference.
+
+## 4.2.1 (2020/07/23)
+* Removed use of StandardCharsets for compatibility with older Android API versions.
+
+## 4.2.0 (2020/07/07)
+* Deprecated AdColonyUserMetadata.
+* Deprecated GDPR specific methods in AdColonyAppOptions in favor of a more generic solution that allows for inclusion of information related to other privacy laws. Please see our page on [privacy laws](https://github.com/AdColony/AdColony-Android-SDK/wiki/Privacy-Laws) for more information.
+* Updated and added support for OM SDK v1.3.4.
+* Added collectSignals() helper for certain advanced bidding mediation integrations.
+* Various bugfixes.
+
+## 4.1.4 (2020/02/25)
+* Updated OM SDK to v1.3.1.
+* Fixed [issue #72](https://github.com/AdColony/AdColony-Android-SDK/issues/72).
+
+## 4.1.3 (2020/01/17)
+* Updated OM SDK to v1.3.0
+
+## 4.1.2 (2019/12/17)
+* Improved handling of exception originally addressed in [3.3.8](https://github.com/AdColony/AdColony-Android-SDK/blob/master/CHANGELOG.md#338-20190117)
+
+## 4.1.1 (2019/12/06)
+* Fixed issue [#65](https://github.com/AdColony/AdColony-Android-SDK/issues/65)
+* Amazon Advertising Id collection.
+* Slightly reduced SDK size.
+* Updated OM SDK.
+* Various Bugfixes.
+
+## 4.1.0 (2019/09/23)
+* Added banner ads.
+* Implemented the Open Measurement SDK for viewability measurement and received certification from IAB.
+
+## 4.0.0 (2019/09)
+* Closed beta.
+
+## 3.3.11 (2019/07/15)
+* Fixed ConcurrentModificationException that was exposed with a server-side update.
+* Fixed an issue related to partial downloads that potentially caused AdColony to become disabled.
+
+## 3.3.10 (2019/04/09)
+* Improved WebView behavior for duties previously handled by our shared object libraries.
+
+## 3.3.9 (2019/03/20)
+* Fixed NullPointerException that stopped ads from being served on Android Lollipop devices with the 3.3.7 and 3.3.8 SDKs.
+
+## 3.3.8 (2019/01/17)
+* Handled RuntimeExceptions that can occur during WebView initialization if the device reports that it is missing the WebView package
+
+## 3.3.7 (2018/12/06)
+* Significant stability improvements related to memory consumption.
+* Reduced ad request response times.
+* Removed shared object (.so) libraries, reducing the size of our SDK distribution by 94% in the process, as well as addressing issues [#25](https://github.com/AdColony/AdColony-Android-SDK-3/issues/25), [#33](https://github.com/AdColony/AdColony-Android-SDK-3/issues/33), and [#38](https://github.com/AdColony/AdColony-Android-SDK-3/issues/38).
+
+## 3.3.6 (2018/11/07)
+* Added additional configure() signatures that accept an Application context instead of Activity.
+* Deprecated AdColonyAdViewActivity, AdColonyNativeAdView, and onAudioStarted/onAudioStopped() callbacks.
+* Handle API level 28 changes for [default cleartext traffic behavior](https://developer.android.com/about/versions/pie/android-9.0-changes-28#framework-security-changes).
+* Several bug fixes and stability improvements.
+
+## 3.3.5 (2018/06/27)
+* Fixed RejectedExecutionException in issue [#37](https://github.com/AdColony/AdColony-Android-SDK-3/issues/37).
+* Made Android SDK changes needed to fix the Unity OnConfigurationCompleted callback issue in [#35](https://github.com/AdColony/AdColony-Unity-SDK-3/issues/35).
+* Several bug fixes and stability improvements.
+
+## 3.3.4 (2018/05/18)
+* Added a new API to pass user consent as required for compliance with the European Union's General Data Protection Regulation (GDPR).
+* Fixed new NullPointerException mentioned in issue [#29](https://github.com/AdColony/AdColony-Android-SDK-3/issues/29#issuecomment-381380548).
+* Several bug fixes and stability improvements.
+
+## 3.3.3 (2018/04/13)
+* Fixed issue [#29](https://github.com/AdColony/AdColony-Android-SDK-3/issues/29).
+* Several other bug fixes.
+
+## 3.3.2 (2018/03/16)
+* Several bug fixes.
+
+## 3.3.0 (2017/12/13)
+* Added Integral Ad Science (IAS) for viewability measurement.
+* Fixed storage overuse issue reported by a small number of publishers upgrading from 2.x -> 3.x.
+* Added an app option that allows publishers to disable screen sleeps during ad playback.
+* Several bug fixes, memory usage optimizations, and stability improvements.
+
+## 3.2.1 (2017/08/28)
+* Fixed AAR hosted on Bintray.
+
+## 3.2.0 (2017/08/24)
+* Android Oreo compatibility along with several bugs fixes, stabilty and security improvements.
+* User experience improvements via enhanced skippability controls and a new mute/unmute feature.
+* Post-install events APIs.
+* Crash reporting and a new, convenient test mode feature.
+
+## 3.1.2 (2017/04/06)
+* Updates for Unity and Adobe Air plugins.
+
+## 3.1.1 (2017/03/28)
+* Removed Compass™ APIs.
+
+## 3.1.0 (2017/03/06)
+* MOAT viewability support.
+* Added viewable impression tracking metric.
+* Added support for our dashboard's play frequency zone setting.
+* Fixed edge case IllegalStateException and NullPointerException on our MediaPlayer handler when our interstitial Activity is destroyed.
+* No longer setting HTTPUrlConnection redirect property globally.
+* Lowered our library's minimum SDK version to fix build issues with apps that support earlier versions. Devices below API 14 will still be blocked at runtime from viewing ads.
+
+## 3.0.7 (2016/12/20)
+* Increased safety in the case where our interstitial Activity is destroyed while paused due to memory pressure.
+
+## 3.0.6 (2016/11/30)
+* Fixed an edge case NPE in our interstitial Activity.
+* General stability improvements.
+
+## 3.0.5 (2016/11/09)
+* Exposed onLeftApplication and onClicked ad callbacks.
+* Fixed possible ad display issue for apps that configure AdColony post onCreate.
+
+## 3.0.4 (2016/10/10)
+* Initial public release.
+* Fixed issue with our x86 builds.
+* Various stability improvements/bug fixes.
+* Added messaging features to Compass, which includes both in-app messages and push notifications.
+
+## 3.0.3.2 (2016/09/14)
+* Support for vertical ads and improved ad orientation controls.
+* Added armeabi-v7a builds.
+* Added support for multi-screen.
+* Changed package name to com.adcolony.sdk.
+* Removed theme requirement for AdColony Activity manifest declarations.
+
+## 3.0.2.2 (2016/08/10)
+* Ensure out of date files from earlier SDK installs are invalidated.
+
+## 3.0.2.1: (2016/07/28)
+* Added support for native ads.
+* Added support for in-app purchase promo ads.
+* Added support for custom messages.
+* Introduction of AdColony Compass™.
+* Various stability improvements/bug fixes.
diff --git a/Demos/InstantFeedDemo/.gitignore b/Demos/BannerDemo/.gitignore
similarity index 57%
rename from Demos/InstantFeedDemo/.gitignore
rename to Demos/BannerDemo/.gitignore
index 9c4de58..0f1d137 100644
--- a/Demos/InstantFeedDemo/.gitignore
+++ b/Demos/BannerDemo/.gitignore
@@ -1,7 +1,9 @@
+*.iml
.gradle
/local.properties
-/.idea/workspace.xml
-/.idea/libraries
+/.idea
.DS_Store
/build
/captures
+.externalNativeBuild
+.cxx
diff --git a/Demos/InstantFeedDemo/app/.gitignore b/Demos/BannerDemo/app/.gitignore
similarity index 100%
rename from Demos/InstantFeedDemo/app/.gitignore
rename to Demos/BannerDemo/app/.gitignore
diff --git a/Demos/BannerDemo/app/build.gradle b/Demos/BannerDemo/app/build.gradle
new file mode 100644
index 0000000..6af1cd3
--- /dev/null
+++ b/Demos/BannerDemo/app/build.gradle
@@ -0,0 +1,25 @@
+apply plugin: 'com.android.application'
+
+android {
+ compileSdkVersion 31
+
+ defaultConfig {
+ applicationId "com.adcolony.bannerdemo"
+ minSdkVersion 14
+ targetSdkVersion 31
+ versionCode 1
+ versionName "1.0"
+ }
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
+ }
+ }
+}
+
+dependencies {
+ implementation 'androidx.appcompat:appcompat:1.3.1'
+ implementation 'com.adcolony:sdk:4.8.0'
+ implementation 'com.google.android.gms:play-services-ads-identifier:17.1.0'
+}
diff --git a/Demos/BannerDemo/app/proguard-rules.pro b/Demos/BannerDemo/app/proguard-rules.pro
new file mode 100644
index 0000000..f1b4245
--- /dev/null
+++ b/Demos/BannerDemo/app/proguard-rules.pro
@@ -0,0 +1,21 @@
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile
diff --git a/Demos/BannerDemo/app/src/main/AndroidManifest.xml b/Demos/BannerDemo/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..c0c0831
--- /dev/null
+++ b/Demos/BannerDemo/app/src/main/AndroidManifest.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Demos/BannerDemo/app/src/main/java/com/adcolony/bannerdemo/BannerActivity.java b/Demos/BannerDemo/app/src/main/java/com/adcolony/bannerdemo/BannerActivity.java
new file mode 100644
index 0000000..4be5373
--- /dev/null
+++ b/Demos/BannerDemo/app/src/main/java/com/adcolony/bannerdemo/BannerActivity.java
@@ -0,0 +1,115 @@
+package com.adcolony.bannerdemo;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.util.Log;
+import android.view.View;
+import android.widget.Button;
+import android.widget.ProgressBar;
+import android.widget.RelativeLayout;
+
+import com.adcolony.sdk.AdColony;
+import com.adcolony.sdk.AdColonyAdOptions;
+import com.adcolony.sdk.AdColonyAdSize;
+import com.adcolony.sdk.AdColonyAdView;
+import com.adcolony.sdk.AdColonyAdViewListener;
+import com.adcolony.sdk.AdColonyAppOptions;
+import com.adcolony.sdk.AdColonyZone;
+
+public class BannerActivity extends Activity {
+
+ private final String APP_ID = "INSERT_YOUR_APP_ID_HERE";
+ private final String ZONE_ID = "INSERT_YOUR_BANNER_ZONE_ID_HERE";
+ private final String TAG = "AdColonyBannerDemo";
+
+ private AdColonyAdViewListener listener;
+ private AdColonyAdOptions adOptions;
+ private RelativeLayout adContainer;
+ private ProgressBar progressBar;
+ private Button buttonLoad;
+ private AdColonyAdView adView;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_main);
+
+ adContainer = findViewById(R.id.ad_container);
+ progressBar = findViewById(R.id.progress);
+ buttonLoad = findViewById(R.id.load_button);
+ buttonLoad.setOnClickListener(view -> {
+ //Remove previous ad view if present.
+ if (adContainer.getChildCount() > 0) {
+ adContainer.removeView(adView);
+ }
+
+ progressBar.setVisibility(View.VISIBLE);
+ buttonLoad.setEnabled(false);
+ buttonLoad.setAlpha(0.5f);
+
+ requestBannerAd();
+ });
+
+ // Construct optional app options object to be sent with configure
+ AdColonyAppOptions appOptions = new AdColonyAppOptions();
+
+ // Configure AdColony in your launching Activity's onCreate() method so that cached ads can
+ // be available as soon as possible.
+ AdColony.configure(this, appOptions, APP_ID);
+
+ listener = new AdColonyAdViewListener() {
+ @Override
+ public void onRequestFilled(AdColonyAdView adColonyAdView) {
+ Log.d(TAG, "onRequestFilled");
+ resetUI();
+ adContainer.addView(adColonyAdView);
+ adView = adColonyAdView;
+ }
+
+ @Override
+ public void onRequestNotFilled(AdColonyZone zone) {
+ super.onRequestNotFilled(zone);
+ Log.d(TAG, "onRequestNotFilled");
+ resetUI();
+ }
+
+ @Override
+ public void onOpened(AdColonyAdView ad) {
+ super.onOpened(ad);
+ Log.d(TAG, "onOpened");
+ }
+
+ @Override
+ public void onClosed(AdColonyAdView ad) {
+ super.onClosed(ad);
+ Log.d(TAG, "onClosed");
+ }
+
+ @Override
+ public void onClicked(AdColonyAdView ad) {
+ super.onClicked(ad);
+ Log.d(TAG, "onClicked");
+ }
+
+ @Override
+ public void onLeftApplication(AdColonyAdView ad) {
+ super.onLeftApplication(ad);
+ Log.d(TAG, "onLeftApplication");
+ }
+ };
+ }
+
+ private void requestBannerAd() {
+ // Optional Ad specific options to be sent with request
+ adOptions = new AdColonyAdOptions();
+
+ //Request Ad
+ AdColony.requestAdView(ZONE_ID, listener, AdColonyAdSize.BANNER, adOptions);
+ }
+
+ private void resetUI() {
+ progressBar.setVisibility(View.GONE);
+ buttonLoad.setEnabled(true);
+ buttonLoad.setAlpha(1.0f);
+ }
+}
diff --git a/Demos/BannerDemo/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/Demos/BannerDemo/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
new file mode 100644
index 0000000..1f6bb29
--- /dev/null
+++ b/Demos/BannerDemo/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Demos/BannerDemo/app/src/main/res/drawable/adcicon.png b/Demos/BannerDemo/app/src/main/res/drawable/adcicon.png
new file mode 100755
index 0000000..56af189
Binary files /dev/null and b/Demos/BannerDemo/app/src/main/res/drawable/adcicon.png differ
diff --git a/Demos/InstantFeedDemo/app/src/main/res/drawable/background.jpg b/Demos/BannerDemo/app/src/main/res/drawable/background.jpg
old mode 100644
new mode 100755
similarity index 100%
rename from Demos/InstantFeedDemo/app/src/main/res/drawable/background.jpg
rename to Demos/BannerDemo/app/src/main/res/drawable/background.jpg
diff --git a/Demos/BannerDemo/app/src/main/res/drawable/button_bg.xml b/Demos/BannerDemo/app/src/main/res/drawable/button_bg.xml
new file mode 100644
index 0000000..7c30eb8
--- /dev/null
+++ b/Demos/BannerDemo/app/src/main/res/drawable/button_bg.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Demos/BannerDemo/app/src/main/res/drawable/ic_launcher_background.xml b/Demos/BannerDemo/app/src/main/res/drawable/ic_launcher_background.xml
new file mode 100644
index 0000000..0d025f9
--- /dev/null
+++ b/Demos/BannerDemo/app/src/main/res/drawable/ic_launcher_background.xml
@@ -0,0 +1,170 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Demos/BannerDemo/app/src/main/res/layout/activity_main.xml b/Demos/BannerDemo/app/src/main/res/layout/activity_main.xml
new file mode 100644
index 0000000..07ef201
--- /dev/null
+++ b/Demos/BannerDemo/app/src/main/res/layout/activity_main.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Demos/BannerDemo/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/Demos/BannerDemo/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
new file mode 100644
index 0000000..eca70cf
--- /dev/null
+++ b/Demos/BannerDemo/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/Demos/BannerDemo/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/Demos/BannerDemo/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
new file mode 100644
index 0000000..eca70cf
--- /dev/null
+++ b/Demos/BannerDemo/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/Demos/BannerDemo/app/src/main/res/mipmap-hdpi/ic_launcher.png b/Demos/BannerDemo/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000..898f3ed
Binary files /dev/null and b/Demos/BannerDemo/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/Demos/BannerDemo/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/Demos/BannerDemo/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
new file mode 100644
index 0000000..dffca36
Binary files /dev/null and b/Demos/BannerDemo/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ
diff --git a/Demos/BannerDemo/app/src/main/res/mipmap-mdpi/ic_launcher.png b/Demos/BannerDemo/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..64ba76f
Binary files /dev/null and b/Demos/BannerDemo/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/Demos/BannerDemo/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/Demos/BannerDemo/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
new file mode 100644
index 0000000..dae5e08
Binary files /dev/null and b/Demos/BannerDemo/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ
diff --git a/Demos/BannerDemo/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/Demos/BannerDemo/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..e5ed465
Binary files /dev/null and b/Demos/BannerDemo/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/Demos/BannerDemo/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/Demos/BannerDemo/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..14ed0af
Binary files /dev/null and b/Demos/BannerDemo/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ
diff --git a/Demos/BannerDemo/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/Demos/BannerDemo/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..b0907ca
Binary files /dev/null and b/Demos/BannerDemo/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/Demos/BannerDemo/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/Demos/BannerDemo/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..d8ae031
Binary files /dev/null and b/Demos/BannerDemo/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ
diff --git a/Demos/BannerDemo/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/Demos/BannerDemo/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 0000000..2c18de9
Binary files /dev/null and b/Demos/BannerDemo/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/Demos/BannerDemo/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/Demos/BannerDemo/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..beed3cd
Binary files /dev/null and b/Demos/BannerDemo/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ
diff --git a/Demos/BannerDemo/app/src/main/res/values/colors.xml b/Demos/BannerDemo/app/src/main/res/values/colors.xml
new file mode 100644
index 0000000..3ab3e9c
--- /dev/null
+++ b/Demos/BannerDemo/app/src/main/res/values/colors.xml
@@ -0,0 +1,6 @@
+
+
+ #3F51B5
+ #303F9F
+ #FF4081
+
diff --git a/Demos/BannerDemo/app/src/main/res/values/strings.xml b/Demos/BannerDemo/app/src/main/res/values/strings.xml
new file mode 100644
index 0000000..a425082
--- /dev/null
+++ b/Demos/BannerDemo/app/src/main/res/values/strings.xml
@@ -0,0 +1,4 @@
+
+ BannerDemo
+ LOAD BANNER AD
+
diff --git a/Demos/InstantFeedDemo/app/src/main/res/values/styles.xml b/Demos/BannerDemo/app/src/main/res/values/styles.xml
similarity index 56%
rename from Demos/InstantFeedDemo/app/src/main/res/values/styles.xml
rename to Demos/BannerDemo/app/src/main/res/values/styles.xml
index 766ab99..83f60f2 100644
--- a/Demos/InstantFeedDemo/app/src/main/res/values/styles.xml
+++ b/Demos/BannerDemo/app/src/main/res/values/styles.xml
@@ -3,6 +3,9 @@
diff --git a/Demos/InstantFeedDemo/build.gradle b/Demos/BannerDemo/build.gradle
similarity index 63%
rename from Demos/InstantFeedDemo/build.gradle
rename to Demos/BannerDemo/build.gradle
index 557f499..34d0146 100644
--- a/Demos/InstantFeedDemo/build.gradle
+++ b/Demos/BannerDemo/build.gradle
@@ -2,10 +2,11 @@
buildscript {
repositories {
- jcenter()
+ google()
+ mavenCentral()
}
dependencies {
- classpath 'com.android.tools.build:gradle:2.2.0'
+ classpath 'com.android.tools.build:gradle:7.0.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
@@ -14,9 +15,11 @@ buildscript {
allprojects {
repositories {
- jcenter()
- maven {
- url "https://adcolony.bintray.com/AdColony"
- }
+ google()
+ mavenCentral()
}
}
+
+task clean(type: Delete) {
+ delete rootProject.buildDir
+}
diff --git a/Demos/InstantFeedDemo/gradle.properties b/Demos/BannerDemo/gradle.properties
similarity index 62%
rename from Demos/InstantFeedDemo/gradle.properties
rename to Demos/BannerDemo/gradle.properties
index 1d3591c..199d16e 100644
--- a/Demos/InstantFeedDemo/gradle.properties
+++ b/Demos/BannerDemo/gradle.properties
@@ -1,18 +1,20 @@
# Project-wide Gradle settings.
-
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
-
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
-
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
-# Default value: -Xmx10248m -XX:MaxPermSize=256m
-# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
-
+org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
-# org.gradle.parallel=true
\ No newline at end of file
+# org.gradle.parallel=true
+# AndroidX package structure to make it clearer which packages are bundled with the
+# Android operating system, and which are packaged with your app's APK
+# https://developer.android.com/topic/libraries/support-library/androidx-rn
+android.useAndroidX=true
+# Automatically convert third-party libraries to use AndroidX
+android.enableJetifier=true
+
diff --git a/Demos/BannerDemo/gradle/wrapper/gradle-wrapper.jar b/Demos/BannerDemo/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..f6b961f
Binary files /dev/null and b/Demos/BannerDemo/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/Demos/InstantFeedDemo/gradle/wrapper/gradle-wrapper.properties b/Demos/BannerDemo/gradle/wrapper/gradle-wrapper.properties
similarity index 79%
rename from Demos/InstantFeedDemo/gradle/wrapper/gradle-wrapper.properties
rename to Demos/BannerDemo/gradle/wrapper/gradle-wrapper.properties
index 25fc9f9..e57dfda 100644
--- a/Demos/InstantFeedDemo/gradle/wrapper/gradle-wrapper.properties
+++ b/Demos/BannerDemo/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Wed Sep 14 17:19:48 PDT 2016
+#Wed Oct 09 15:59:30 IST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
diff --git a/Demos/InstantFeedDemo/gradlew b/Demos/BannerDemo/gradlew
similarity index 83%
rename from Demos/InstantFeedDemo/gradlew
rename to Demos/BannerDemo/gradlew
index 91a7e26..cccdd3d 100755
--- a/Demos/InstantFeedDemo/gradlew
+++ b/Demos/BannerDemo/gradlew
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/env sh
##############################################################################
##
@@ -6,20 +6,38 @@
##
##############################################################################
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
-warn ( ) {
+warn () {
echo "$*"
}
-die ( ) {
+die () {
echo
echo "$*"
echo
@@ -30,6 +48,7 @@ die ( ) {
cygwin=false
msys=false
darwin=false
+nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
@@ -40,31 +59,11 @@ case "`uname`" in
MINGW* )
msys=true
;;
+ NONSTOP* )
+ nonstop=true
+ ;;
esac
-# For Cygwin, ensure paths are in UNIX format before anything is touched.
-if $cygwin ; then
- [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
-fi
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >&-
-APP_HOME="`pwd -P`"
-cd "$SAVED" >&-
-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
@@ -90,7 +89,7 @@ location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
@@ -114,6 +113,7 @@ fi
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
@@ -154,11 +154,19 @@ if $cygwin ; then
esac
fi
-# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
-function splitJvmOpts() {
- JVM_OPTS=("$@")
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
}
-eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
-JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+APP_ARGS=$(save "$@")
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+ cd "$(dirname "$0")"
+fi
-exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
+exec "$JAVACMD" "$@"
diff --git a/Demos/InstantFeedDemo/gradlew.bat b/Demos/BannerDemo/gradlew.bat
similarity index 88%
rename from Demos/InstantFeedDemo/gradlew.bat
rename to Demos/BannerDemo/gradlew.bat
index aec9973..f955316 100644
--- a/Demos/InstantFeedDemo/gradlew.bat
+++ b/Demos/BannerDemo/gradlew.bat
@@ -1,90 +1,84 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windowz variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-if "%@eval[2+2]" == "4" goto 4NT_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-goto execute
-
-:4NT_args
-@rem Get arguments from the 4NT Shell from JP Software
-set CMD_LINE_ARGS=%$
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/Demos/BannerDemo/settings.gradle b/Demos/BannerDemo/settings.gradle
new file mode 100644
index 0000000..a52b207
--- /dev/null
+++ b/Demos/BannerDemo/settings.gradle
@@ -0,0 +1,2 @@
+include ':app'
+rootProject.name='BannerDemo'
diff --git a/Demos/InstantFeedDemo/.idea/compiler.xml b/Demos/InstantFeedDemo/.idea/compiler.xml
deleted file mode 100644
index 96cc43e..0000000
--- a/Demos/InstantFeedDemo/.idea/compiler.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Demos/InstantFeedDemo/.idea/copyright/profiles_settings.xml b/Demos/InstantFeedDemo/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index e7bedf3..0000000
--- a/Demos/InstantFeedDemo/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/Demos/InstantFeedDemo/.idea/encodings.xml b/Demos/InstantFeedDemo/.idea/encodings.xml
deleted file mode 100644
index 97626ba..0000000
--- a/Demos/InstantFeedDemo/.idea/encodings.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Demos/InstantFeedDemo/.idea/gradle.xml b/Demos/InstantFeedDemo/.idea/gradle.xml
deleted file mode 100644
index 7ac24c7..0000000
--- a/Demos/InstantFeedDemo/.idea/gradle.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Demos/InstantFeedDemo/.idea/misc.xml b/Demos/InstantFeedDemo/.idea/misc.xml
deleted file mode 100644
index 1d77643..0000000
--- a/Demos/InstantFeedDemo/.idea/misc.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Demos/InstantFeedDemo/.idea/modules.xml b/Demos/InstantFeedDemo/.idea/modules.xml
deleted file mode 100644
index b9037fa..0000000
--- a/Demos/InstantFeedDemo/.idea/modules.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Demos/InstantFeedDemo/.idea/runConfigurations.xml b/Demos/InstantFeedDemo/.idea/runConfigurations.xml
deleted file mode 100644
index 7f68460..0000000
--- a/Demos/InstantFeedDemo/.idea/runConfigurations.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Demos/InstantFeedDemo/InstantFeedDemo.iml b/Demos/InstantFeedDemo/InstantFeedDemo.iml
deleted file mode 100644
index 9381937..0000000
--- a/Demos/InstantFeedDemo/InstantFeedDemo.iml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Demos/InstantFeedDemo/app/app.iml b/Demos/InstantFeedDemo/app/app.iml
deleted file mode 100644
index 1660290..0000000
--- a/Demos/InstantFeedDemo/app/app.iml
+++ /dev/null
@@ -1,146 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- generateDebugSources
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Demos/InstantFeedDemo/app/build.gradle b/Demos/InstantFeedDemo/app/build.gradle
deleted file mode 100644
index ae3f349..0000000
--- a/Demos/InstantFeedDemo/app/build.gradle
+++ /dev/null
@@ -1,26 +0,0 @@
-apply plugin: 'com.android.application'
-
-android {
- compileSdkVersion 24
- buildToolsVersion "23.0.3"
-
- defaultConfig {
- applicationId "com.adcolony.instantfeeddemo"
- minSdkVersion 14
- targetSdkVersion 24
- versionCode 1
- versionName "1.0"
- }
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- }
- }
-}
-
-dependencies {
- compile 'com.adcolony:sdk:3.0.4'
- compile 'com.android.support:appcompat-v7:24.2.1'
- compile 'com.google.android.gms:play-services-ads:9.4.0'
-}
diff --git a/Demos/InstantFeedDemo/app/proguard-rules.pro b/Demos/InstantFeedDemo/app/proguard-rules.pro
deleted file mode 100644
index f4b3ae8..0000000
--- a/Demos/InstantFeedDemo/app/proguard-rules.pro
+++ /dev/null
@@ -1,17 +0,0 @@
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in /Users/brittmullen/Desktop/Stuff/android-sdk-macosx/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the proguardFiles
-# directive in build.gradle.
-#
-# For more details, see
-# http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-# public *;
-#}
diff --git a/Demos/InstantFeedDemo/app/src/androidTest/java/com/adcolony/instantfeeddemo/ApplicationTest.java b/Demos/InstantFeedDemo/app/src/androidTest/java/com/adcolony/instantfeeddemo/ApplicationTest.java
deleted file mode 100644
index 75b5b81..0000000
--- a/Demos/InstantFeedDemo/app/src/androidTest/java/com/adcolony/instantfeeddemo/ApplicationTest.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.adcolony.instantfeeddemo;
-
-import android.app.Application;
-import android.test.ApplicationTestCase;
-
-/**
- * Testing Fundamentals
- */
-public class ApplicationTest extends ApplicationTestCase
-{
- public ApplicationTest()
- {
- super( Application.class );
- }
-}
\ No newline at end of file
diff --git a/Demos/InstantFeedDemo/app/src/main/AndroidManifest.xml b/Demos/InstantFeedDemo/app/src/main/AndroidManifest.xml
deleted file mode 100644
index 96750e5..0000000
--- a/Demos/InstantFeedDemo/app/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Demos/InstantFeedDemo/app/src/main/build.xml b/Demos/InstantFeedDemo/app/src/main/build.xml
deleted file mode 100644
index 0d50a55..0000000
--- a/Demos/InstantFeedDemo/app/src/main/build.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Demos/InstantFeedDemo/app/src/main/java/com/adcolony/instantfeeddemo/InstantFeedActivity.java b/Demos/InstantFeedDemo/app/src/main/java/com/adcolony/instantfeeddemo/InstantFeedActivity.java
deleted file mode 100644
index cd3d9d4..0000000
--- a/Demos/InstantFeedDemo/app/src/main/java/com/adcolony/instantfeeddemo/InstantFeedActivity.java
+++ /dev/null
@@ -1,117 +0,0 @@
-package com.adcolony.instantfeeddemo;
-
-import android.app.Activity;
-import android.os.Bundle;
-import android.util.Log;
-import android.widget.LinearLayout;
-import android.widget.Toast;
-
-import com.adcolony.sdk.*;
-
-public class InstantFeedActivity extends Activity
-{
- private AdColonyNativeAdView ad_view;
- private LinearLayout ad_layout;
- private AdColonyNativeAdViewListener ad_listener;
- private AdColonyAdOptions ad_options;
-
- private final String APP_ID = "app185a7e71e1714831a49ec7";
- private final String ZONE_ID = "vze4675ec2638048a789";
- private final String TAG = "InstantFeed";
-
- @Override
- protected void onCreate( Bundle savedInstanceState )
- {
- super.onCreate( savedInstanceState );
- setContentView( R.layout.layout );
-
- ad_layout = (LinearLayout) findViewById( R.id.instant_feed_layout );
-
- /** Construct optional app options object to be sent with configure */
- AdColonyAppOptions app_options = new AdColonyAppOptions()
- .setUserID( "unique_user_id" );
-
- AdColony.configure( this, app_options, APP_ID, ZONE_ID );
-
- /** Instantiate ad specific listener for native ad view callbacks */
- ad_listener = new AdColonyNativeAdViewListener()
- {
- @Override
- public void onRequestFilled( AdColonyNativeAdView view )
- {
- ad_view = view;
- ad_layout.addView( ad_view );
- Toast.makeText( InstantFeedActivity.this,
- "Instant-Feed ad added to layout. Scroll through your feed to find it.",
- Toast.LENGTH_LONG).show();
-
- /** Add/style engagement button to your layout as appropriate */
- if (ad_view.isEngagementEnabled())
- {
- /**
- * If you already have a button you want to use, you should use the engagement button's
- * getOnClickListener method to use as your button's click listener
- */
-
- AdColonyNativeAdView.EngagementButton engagement_button = ad_view.getEngagementButton();
- ad_layout.addView( engagement_button );
- }
- }
-
- @Override
- public void onMuted( AdColonyNativeAdView view )
- {
- Log.d( TAG, "onMuted" );
- }
-
- @Override
- public void onUnmuted( AdColonyNativeAdView view )
- {
- Log.d( TAG, "onUnmuted" );
- }
-
- @Override
- public void onRequestNotFilled( AdColonyZone zone )
- {
- Log.d( TAG, "onRequestNotFilled" );
- }
-
- @Override
- public void onNativeVideoFinished( AdColonyNativeAdView view )
- {
- Log.d( TAG, "onNativeVideoFinished" );
- }
- };
-
- /** Ad specific options to be sent with the request */
- AdColonyUserMetadata metadata = new AdColonyUserMetadata()
- .setUserAge( 26 )
- .setUserEducation( AdColonyUserMetadata.USER_EDUCATION_BACHELORS_DEGREE )
- .setUserGender( AdColonyUserMetadata.USER_MALE );
- ad_options = new AdColonyAdOptions().setUserMetadata( metadata );
-
- /**
- * It's somewhat arbitrary when your ad request should be made. Here we are simply making
- * a request onCreate, but really this can be done at any reasonable time before you plan on
- * displaying the ad view.
- *
- * Optionally update location info in the ad options for each request:
- * LocationManager location_manager = (LocationManager) getSystemService( Context.LOCATION_SERVICE );
- * Location location = location_manager.getLastKnownLocation( LocationManager.GPS_PROVIDER );
- * ad_options.setUserMetadata( ad_options.getUserMetadata().setUserLocation( location ) );
- */
- AdColony.requestNativeAdView( ZONE_ID, ad_listener, AdColonyAdSize.MEDIUM_RECTANGLE, ad_options );
- }
-
- @Override
- protected void onDestroy()
- {
- super.onDestroy();
- if (ad_view != null)
- {
- ad_view.destroy();
- ad_layout.removeView( ad_view );
- ad_view = null;
- }
- }
-}
diff --git a/Demos/InstantFeedDemo/app/src/main/proguard-project.txt b/Demos/InstantFeedDemo/app/src/main/proguard-project.txt
deleted file mode 100644
index f2fe155..0000000
--- a/Demos/InstantFeedDemo/app/src/main/proguard-project.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-# To enable ProGuard in your project, edit project.properties
-# to define the proguard.config property as described in that file.
-#
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in ${sdk.dir}/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the ProGuard
-# include property in project.properties.
-#
-# For more details, see
-# http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-# public *;
-#}
diff --git a/Demos/InstantFeedDemo/app/src/main/project.properties b/Demos/InstantFeedDemo/app/src/main/project.properties
deleted file mode 100644
index 2dc590e..0000000
--- a/Demos/InstantFeedDemo/app/src/main/project.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-# This file is automatically generated by Android Tools.
-# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
-#
-# This file must be checked in Version Control Systems.
-#
-# To customize properties used by the Ant build system edit
-# "ant.properties", and override values to adapt the script to your
-# project structure.
-#
-# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
-#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
-
-# Project target.
-target=Google Inc.:Google APIs:23
diff --git a/Demos/InstantFeedDemo/app/src/main/res/drawable/icon.png b/Demos/InstantFeedDemo/app/src/main/res/drawable/icon.png
deleted file mode 100644
index 8663c3f..0000000
Binary files a/Demos/InstantFeedDemo/app/src/main/res/drawable/icon.png and /dev/null differ
diff --git a/Demos/InstantFeedDemo/app/src/main/res/layout/layout.xml b/Demos/InstantFeedDemo/app/src/main/res/layout/layout.xml
deleted file mode 100644
index 0256a73..0000000
--- a/Demos/InstantFeedDemo/app/src/main/res/layout/layout.xml
+++ /dev/null
@@ -1,147 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Demos/InstantFeedDemo/app/src/main/res/menu/menu.xml b/Demos/InstantFeedDemo/app/src/main/res/menu/menu.xml
deleted file mode 100644
index 1c31a8c..0000000
--- a/Demos/InstantFeedDemo/app/src/main/res/menu/menu.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
diff --git a/Demos/InstantFeedDemo/app/src/main/res/mipmap-hdpi/ic_launcher.png b/Demos/InstantFeedDemo/app/src/main/res/mipmap-hdpi/ic_launcher.png
deleted file mode 100644
index cde69bc..0000000
Binary files a/Demos/InstantFeedDemo/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ
diff --git a/Demos/InstantFeedDemo/app/src/main/res/mipmap-mdpi/ic_launcher.png b/Demos/InstantFeedDemo/app/src/main/res/mipmap-mdpi/ic_launcher.png
deleted file mode 100644
index c133a0c..0000000
Binary files a/Demos/InstantFeedDemo/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ
diff --git a/Demos/InstantFeedDemo/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/Demos/InstantFeedDemo/app/src/main/res/mipmap-xhdpi/ic_launcher.png
deleted file mode 100644
index bfa42f0..0000000
Binary files a/Demos/InstantFeedDemo/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ
diff --git a/Demos/InstantFeedDemo/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/Demos/InstantFeedDemo/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
deleted file mode 100644
index 324e72c..0000000
Binary files a/Demos/InstantFeedDemo/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ
diff --git a/Demos/InstantFeedDemo/app/src/main/res/values-w820dp/dimens.xml b/Demos/InstantFeedDemo/app/src/main/res/values-w820dp/dimens.xml
deleted file mode 100644
index 63fc816..0000000
--- a/Demos/InstantFeedDemo/app/src/main/res/values-w820dp/dimens.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
- 64dp
-
diff --git a/Demos/InstantFeedDemo/app/src/main/res/values/dimens.xml b/Demos/InstantFeedDemo/app/src/main/res/values/dimens.xml
deleted file mode 100644
index 47c8224..0000000
--- a/Demos/InstantFeedDemo/app/src/main/res/values/dimens.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
- 16dp
- 16dp
-
diff --git a/Demos/InstantFeedDemo/app/src/main/res/values/strings.xml b/Demos/InstantFeedDemo/app/src/main/res/values/strings.xml
deleted file mode 100644
index dc06660..0000000
--- a/Demos/InstantFeedDemo/app/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
- InstantFeedDemo
-
- Hello world!
- Settings
-
diff --git a/Demos/InstantFeedDemo/gradle/wrapper/gradle-wrapper.jar b/Demos/InstantFeedDemo/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index 8c0fb64..0000000
Binary files a/Demos/InstantFeedDemo/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/Demos/InstantFeedDemo/settings.gradle b/Demos/InstantFeedDemo/settings.gradle
deleted file mode 100644
index e7b4def..0000000
--- a/Demos/InstantFeedDemo/settings.gradle
+++ /dev/null
@@ -1 +0,0 @@
-include ':app'
diff --git a/Demos/InterstitialDemo/.gitignore b/Demos/InterstitialDemo/.gitignore
index c6cbe56..5f94008 100644
--- a/Demos/InterstitialDemo/.gitignore
+++ b/Demos/InterstitialDemo/.gitignore
@@ -1,8 +1,7 @@
*.iml
.gradle
/local.properties
-/.idea/workspace.xml
-/.idea/libraries
+/.idea
.DS_Store
/build
/captures
diff --git a/Demos/InterstitialDemo/.idea/compiler.xml b/Demos/InterstitialDemo/.idea/compiler.xml
deleted file mode 100644
index 96cc43e..0000000
--- a/Demos/InterstitialDemo/.idea/compiler.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Demos/InterstitialDemo/.idea/copyright/profiles_settings.xml b/Demos/InterstitialDemo/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index e7bedf3..0000000
--- a/Demos/InterstitialDemo/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/Demos/InterstitialDemo/.idea/encodings.xml b/Demos/InterstitialDemo/.idea/encodings.xml
deleted file mode 100644
index 97626ba..0000000
--- a/Demos/InterstitialDemo/.idea/encodings.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Demos/InterstitialDemo/.idea/gradle.xml b/Demos/InterstitialDemo/.idea/gradle.xml
deleted file mode 100644
index 7ac24c7..0000000
--- a/Demos/InterstitialDemo/.idea/gradle.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Demos/InterstitialDemo/.idea/misc.xml b/Demos/InterstitialDemo/.idea/misc.xml
deleted file mode 100644
index 1d77643..0000000
--- a/Demos/InterstitialDemo/.idea/misc.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Demos/InterstitialDemo/.idea/modules.xml b/Demos/InterstitialDemo/.idea/modules.xml
deleted file mode 100644
index 2a889dd..0000000
--- a/Demos/InterstitialDemo/.idea/modules.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Demos/InterstitialDemo/.idea/runConfigurations.xml b/Demos/InterstitialDemo/.idea/runConfigurations.xml
deleted file mode 100644
index 7f68460..0000000
--- a/Demos/InterstitialDemo/.idea/runConfigurations.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Demos/InterstitialDemo/app/build.gradle b/Demos/InterstitialDemo/app/build.gradle
index 3b5abb6..a15f2e9 100644
--- a/Demos/InterstitialDemo/app/build.gradle
+++ b/Demos/InterstitialDemo/app/build.gradle
@@ -1,13 +1,12 @@
apply plugin: 'com.android.application'
android {
- compileSdkVersion 24
- buildToolsVersion "23.0.3"
+ compileSdkVersion 31
defaultConfig {
applicationId "com.adcolony.interstitialdemo"
minSdkVersion 14
- targetSdkVersion 24
+ targetSdkVersion 31
versionCode 1
versionName "1.0"
}
@@ -20,7 +19,7 @@ android {
}
dependencies {
- compile 'com.android.support:appcompat-v7:24.2.1'
- compile 'com.adcolony:sdk:3.0.4'
- compile 'com.google.android.gms:play-services-ads:9.4.0'
+ implementation 'androidx.appcompat:appcompat:1.3.1'
+ implementation 'com.adcolony:sdk:4.8.0'
+ implementation 'com.google.android.gms:play-services-ads-identifier:17.1.0'
}
diff --git a/Demos/InterstitialDemo/app/src/androidTest/java/com/adcolony/interstitialdemo/ApplicationTest.java b/Demos/InterstitialDemo/app/src/androidTest/java/com/adcolony/interstitialdemo/ApplicationTest.java
deleted file mode 100644
index ff7a667..0000000
--- a/Demos/InterstitialDemo/app/src/androidTest/java/com/adcolony/interstitialdemo/ApplicationTest.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.adcolony.interstitialdemo;
-
-import android.app.Application;
-import android.test.ApplicationTestCase;
-
-/**
- * Testing Fundamentals
- */
-public class ApplicationTest extends ApplicationTestCase
-{
- public ApplicationTest()
- {
- super( Application.class );
- }
-}
\ No newline at end of file
diff --git a/Demos/InterstitialDemo/app/src/main/AndroidManifest.xml b/Demos/InterstitialDemo/app/src/main/AndroidManifest.xml
index 41d214b..ffd5f7a 100644
--- a/Demos/InterstitialDemo/app/src/main/AndroidManifest.xml
+++ b/Demos/InterstitialDemo/app/src/main/AndroidManifest.xml
@@ -1,30 +1,25 @@
-
+
-
-
-
+ android:label="@string/app_name"
+ android:usesCleartextTraffic="true">
-
+
-
-
+
+
-
-
-
-
\ No newline at end of file
+
diff --git a/Demos/InterstitialDemo/app/src/main/java/com/adcolony/interstitialdemo/InterstitialActivity.java b/Demos/InterstitialDemo/app/src/main/java/com/adcolony/interstitialdemo/InterstitialActivity.java
index 3b40e27..74c7250 100644
--- a/Demos/InterstitialDemo/app/src/main/java/com/adcolony/interstitialdemo/InterstitialActivity.java
+++ b/Demos/InterstitialDemo/app/src/main/java/com/adcolony/interstitialdemo/InterstitialActivity.java
@@ -7,126 +7,102 @@
import android.widget.Button;
import android.widget.ProgressBar;
-import com.adcolony.sdk.*;
+import com.adcolony.sdk.AdColony;
+import com.adcolony.sdk.AdColonyAdOptions;
+import com.adcolony.sdk.AdColonyAppOptions;
+import com.adcolony.sdk.AdColonyInterstitial;
+import com.adcolony.sdk.AdColonyInterstitialListener;
+import com.adcolony.sdk.AdColonyZone;
-public class InterstitialActivity extends Activity
-{
- final private String APP_ID = "app185a7e71e1714831a49ec7";
- final private String ZONE_ID = "vz06e8c32a037749699e7050";
- final private String TAG = "AdColonyDemo";
+public class InterstitialActivity extends Activity {
- private Button show_button;
+ private final String APP_ID = "INSERT_YOUR_APP_ID_HERE";
+ private final String ZONE_ID = "INSERT_YOUR_INTERSTITIAL_ZONE_ID_HERE";
+ private final String TAG = "AdColonyDemo";
+
+ private Button showButton;
private ProgressBar progress;
private AdColonyInterstitial ad;
private AdColonyInterstitialListener listener;
- private AdColonyAdOptions ad_options;
+ private AdColonyAdOptions adOptions;
@Override
- protected void onCreate( Bundle bundle )
- {
- super.onCreate( bundle );
- setContentView( R.layout.activity_interstitial );
- progress = (ProgressBar) findViewById( R.id.progress );
-
- /** Construct optional app options object to be sent with configure */
- AdColonyAppOptions app_options = new AdColonyAppOptions()
- .setUserID( "unique_user_id" );
-
- /**
- * Configure AdColony in your launching Activity's onCreate() method so that cached ads can
- * be available as soon as possible.
- */
- AdColony.configure( this, app_options, APP_ID, ZONE_ID );
-
- /** Optional user metadata sent with the ad options in each request */
- AdColonyUserMetadata metadata = new AdColonyUserMetadata()
- .setUserAge( 26 )
- .setUserEducation( AdColonyUserMetadata.USER_EDUCATION_BACHELORS_DEGREE )
- .setUserGender( AdColonyUserMetadata.USER_MALE );
-
- /** Ad specific options to be sent with request */
- ad_options = new AdColonyAdOptions()
- .setUserMetadata( metadata );
-
-
- /**
- * Set up listener for interstitial ad callbacks. You only need to implement the callbacks
- * that you care about. The only required callback is onRequestFilled, as this is the only
- * way to get an ad object.
- */
- listener = new AdColonyInterstitialListener()
- {
- /** Ad passed back in request filled callback, ad can now be shown */
+ protected void onCreate(Bundle bundle) {
+ super.onCreate(bundle);
+ setContentView(R.layout.activity_interstitial);
+ progress = findViewById(R.id.progress);
+
+ // Construct optional app options object to be sent with configure
+ AdColonyAppOptions appOptions = new AdColonyAppOptions()
+ .setUserID("unique_user_id")
+ .setKeepScreenOn(true);
+
+ // Configure AdColony in your launching Activity's onCreate() method so that cached ads can
+ // be available as soon as possible.
+ AdColony.configure(this, appOptions, APP_ID);
+
+ // Ad specific options to be sent with request
+ adOptions = new AdColonyAdOptions();
+
+ // Set up listener for interstitial ad callbacks. You only need to implement the callbacks
+ // that you care about. The only required callback is onRequestFilled, as this is the only
+ // way to get an ad object.
+ listener = new AdColonyInterstitialListener() {
@Override
- public void onRequestFilled( AdColonyInterstitial ad )
- {
+ public void onRequestFilled(AdColonyInterstitial ad) {
+ // Ad passed back in request filled callback, ad can now be shown
InterstitialActivity.this.ad = ad;
- show_button.setEnabled( true );
- progress.setVisibility( View.INVISIBLE );
- Log.d( TAG, "onRequestFilled" );
+ showButton.setEnabled(true);
+ progress.setVisibility(View.INVISIBLE);
+ Log.d(TAG, "onRequestFilled");
}
- /** Ad request was not filled */
@Override
- public void onRequestNotFilled( AdColonyZone zone )
- {
- progress.setVisibility( View.INVISIBLE );
- Log.d( TAG, "onRequestNotFilled");
+ public void onRequestNotFilled(AdColonyZone zone) {
+ // Ad request was not filled
+ progress.setVisibility(View.INVISIBLE);
+ Log.d(TAG, "onRequestNotFilled");
}
- /** Ad opened, reset UI to reflect state change */
@Override
- public void onOpened( AdColonyInterstitial ad )
- {
- show_button.setEnabled( false );
- progress.setVisibility( View.VISIBLE );
- Log.d( TAG, "onOpened" );
+ public void onOpened(AdColonyInterstitial ad) {
+ // Ad opened, reset UI to reflect state change
+ showButton.setEnabled(false);
+ progress.setVisibility(View.VISIBLE);
+ Log.d(TAG, "onOpened");
}
- /** Request a new ad if ad is expiring */
@Override
- public void onExpiring( AdColonyInterstitial ad )
- {
- show_button.setEnabled( false );
- progress.setVisibility( View.VISIBLE );
- AdColony.requestInterstitial( ZONE_ID, this, ad_options );
- Log.d( TAG, "onExpiring" );
+ public void onExpiring(AdColonyInterstitial ad) {
+ // Request a new ad if ad is expiring
+ showButton.setEnabled(false);
+ progress.setVisibility(View.VISIBLE);
+ AdColony.requestInterstitial(ZONE_ID, this, adOptions);
+ Log.d(TAG, "onExpiring");
}
};
- /** Set up button to show an ad when clicked */
- show_button = (Button) findViewById( R.id.showbutton );
- show_button.setOnClickListener( new View.OnClickListener()
- {
- @Override
- public void onClick( View view )
- {
- ad.show();
- }
- } );
+ // Set up button to show an ad when clicked
+ showButton = findViewById(R.id.showbutton);
+ showButton.setOnClickListener(v -> ad.show());
}
@Override
- protected void onResume()
- {
+ protected void onResume() {
super.onResume();
- /**
- * It's somewhat arbitrary when your ad request should be made. Here we are simply making
- * a request if there is no valid ad available onResume, but really this can be done at any
- * reasonable time before you plan on showing an ad.
- */
- if (ad == null || ad.isExpired())
- {
- /**
- * Optionally update location info in the ad options for each request:
- * LocationManager location_manager = (LocationManager) getSystemService( Context.LOCATION_SERVICE );
- * Location location = location_manager.getLastKnownLocation( LocationManager.GPS_PROVIDER );
- * ad_options.setUserMetadata( ad_options.getUserMetadata().setUserLocation( location ) );
- */
- progress.setVisibility( View.VISIBLE );
- AdColony.requestInterstitial( ZONE_ID, listener, ad_options );
+ // It's somewhat arbitrary when your ad request should be made. Here we are simply making
+ // a request if there is no valid ad available onResume, but really this can be done at any
+ // reasonable time before you plan on showing an ad.
+ if (ad == null || ad.isExpired()) {
+ // Optionally update location info in the ad options for each request:
+ // LocationManager locationManager =
+ // (LocationManager) getSystemService(Context.LOCATION_SERVICE);
+ // Location location =
+ // locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);
+ // adOptions.setUserMetadata(adOptions.getUserMetadata().setUserLocation(location));
+ progress.setVisibility(View.VISIBLE);
+ AdColony.requestInterstitial(ZONE_ID, listener, adOptions);
}
-
}
}
diff --git a/Demos/InterstitialDemo/app/src/main/res/layout/activity_interstitial.xml b/Demos/InterstitialDemo/app/src/main/res/layout/activity_interstitial.xml
index cfc9d49..adedb83 100644
--- a/Demos/InterstitialDemo/app/src/main/res/layout/activity_interstitial.xml
+++ b/Demos/InterstitialDemo/app/src/main/res/layout/activity_interstitial.xml
@@ -1,47 +1,42 @@
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ tools:context=".InterstitialActivity"
+ tools:ignore="ContentDescription">
+ android:src="@drawable/background" />
+ android:src="@drawable/text" />
+ android:background="@drawable/buttonxml"
+ android:enabled="false" />
-
-
-
+ android:layout_alignParentRight="true"
+ android:indeterminate="false" />
-
+
\ No newline at end of file
diff --git a/Demos/InterstitialDemo/app/src/test/java/com/adcolony/interstitialdemo/ExampleUnitTest.java b/Demos/InterstitialDemo/app/src/test/java/com/adcolony/interstitialdemo/ExampleUnitTest.java
deleted file mode 100644
index 2fe16e7..0000000
--- a/Demos/InterstitialDemo/app/src/test/java/com/adcolony/interstitialdemo/ExampleUnitTest.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.adcolony.interstitialdemo;
-
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-/**
- * To work on unit tests, switch the Test Artifact in the Build Variants view.
- */
-public class ExampleUnitTest
-{
- @Test
- public void addition_isCorrect() throws Exception
- {
- assertEquals( 4, 2 + 2 );
- }
-}
\ No newline at end of file
diff --git a/Demos/InterstitialDemo/build.gradle b/Demos/InterstitialDemo/build.gradle
index 9daee43..34d0146 100644
--- a/Demos/InterstitialDemo/build.gradle
+++ b/Demos/InterstitialDemo/build.gradle
@@ -2,10 +2,11 @@
buildscript {
repositories {
- jcenter()
+ google()
+ mavenCentral()
}
dependencies {
- classpath 'com.android.tools.build:gradle:2.2.0'
+ classpath 'com.android.tools.build:gradle:7.0.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
@@ -14,10 +15,8 @@ buildscript {
allprojects {
repositories {
- jcenter()
- maven {
- url "https://adcolony.bintray.com/AdColony"
- }
+ google()
+ mavenCentral()
}
}
diff --git a/Demos/InterstitialDemo/gradle.properties b/Demos/InterstitialDemo/gradle.properties
index 1d3591c..915f0e6 100644
--- a/Demos/InterstitialDemo/gradle.properties
+++ b/Demos/InterstitialDemo/gradle.properties
@@ -15,4 +15,6 @@
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
-# org.gradle.parallel=true
\ No newline at end of file
+# org.gradle.parallel=true
+android.enableJetifier=true
+android.useAndroidX=true
\ No newline at end of file
diff --git a/Demos/InterstitialDemo/gradle/wrapper/gradle-wrapper.jar b/Demos/InterstitialDemo/gradle/wrapper/gradle-wrapper.jar
index 13372ae..f6b961f 100644
Binary files a/Demos/InterstitialDemo/gradle/wrapper/gradle-wrapper.jar and b/Demos/InterstitialDemo/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/Demos/InterstitialDemo/gradle/wrapper/gradle-wrapper.properties b/Demos/InterstitialDemo/gradle/wrapper/gradle-wrapper.properties
index 2e204ef..ab68379 100644
--- a/Demos/InterstitialDemo/gradle/wrapper/gradle-wrapper.properties
+++ b/Demos/InterstitialDemo/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Thu Aug 25 09:24:59 PDT 2016
+#Mon Jul 15 13:10:21 PDT 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
diff --git a/Demos/InterstitialDemo/gradlew b/Demos/InterstitialDemo/gradlew
index 9d82f78..cccdd3d 100755
--- a/Demos/InterstitialDemo/gradlew
+++ b/Demos/InterstitialDemo/gradlew
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/env sh
##############################################################################
##
@@ -6,20 +6,38 @@
##
##############################################################################
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
-warn ( ) {
+warn () {
echo "$*"
}
-die ( ) {
+die () {
echo
echo "$*"
echo
@@ -30,6 +48,7 @@ die ( ) {
cygwin=false
msys=false
darwin=false
+nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
@@ -40,26 +59,11 @@ case "`uname`" in
MINGW* )
msys=true
;;
+ NONSTOP* )
+ nonstop=true
+ ;;
esac
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
@@ -85,7 +89,7 @@ location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
@@ -150,11 +154,19 @@ if $cygwin ; then
esac
fi
-# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
-function splitJvmOpts() {
- JVM_OPTS=("$@")
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
}
-eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
-JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+APP_ARGS=$(save "$@")
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+ cd "$(dirname "$0")"
+fi
-exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
+exec "$JAVACMD" "$@"
diff --git a/Demos/InterstitialDemo/gradlew.bat b/Demos/InterstitialDemo/gradlew.bat
index aec9973..e95643d 100644
--- a/Demos/InterstitialDemo/gradlew.bat
+++ b/Demos/InterstitialDemo/gradlew.bat
@@ -8,14 +8,14 @@
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
-
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
@@ -46,10 +46,9 @@ echo location of your Java installation.
goto fail
:init
-@rem Get command-line arguments, handling Windowz variants
+@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
-if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args
@rem Slurp the command line arguments.
@@ -60,11 +59,6 @@ set _SKIP=2
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
-goto execute
-
-:4NT_args
-@rem Get arguments from the 4NT Shell from JP Software
-set CMD_LINE_ARGS=%$
:execute
@rem Setup the command line
diff --git a/Demos/RewardedInterstitialDemo/.gitignore b/Demos/RewardedInterstitialDemo/.gitignore
index c6cbe56..5f94008 100644
--- a/Demos/RewardedInterstitialDemo/.gitignore
+++ b/Demos/RewardedInterstitialDemo/.gitignore
@@ -1,8 +1,7 @@
*.iml
.gradle
/local.properties
-/.idea/workspace.xml
-/.idea/libraries
+/.idea
.DS_Store
/build
/captures
diff --git a/Demos/RewardedInterstitialDemo/.idea/compiler.xml b/Demos/RewardedInterstitialDemo/.idea/compiler.xml
deleted file mode 100644
index 96cc43e..0000000
--- a/Demos/RewardedInterstitialDemo/.idea/compiler.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Demos/RewardedInterstitialDemo/.idea/copyright/profiles_settings.xml b/Demos/RewardedInterstitialDemo/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index e7bedf3..0000000
--- a/Demos/RewardedInterstitialDemo/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/Demos/RewardedInterstitialDemo/.idea/encodings.xml b/Demos/RewardedInterstitialDemo/.idea/encodings.xml
deleted file mode 100644
index 97626ba..0000000
--- a/Demos/RewardedInterstitialDemo/.idea/encodings.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Demos/RewardedInterstitialDemo/.idea/gradle.xml b/Demos/RewardedInterstitialDemo/.idea/gradle.xml
deleted file mode 100644
index 7ac24c7..0000000
--- a/Demos/RewardedInterstitialDemo/.idea/gradle.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Demos/RewardedInterstitialDemo/.idea/misc.xml b/Demos/RewardedInterstitialDemo/.idea/misc.xml
deleted file mode 100644
index 5d19981..0000000
--- a/Demos/RewardedInterstitialDemo/.idea/misc.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Demos/RewardedInterstitialDemo/.idea/modules.xml b/Demos/RewardedInterstitialDemo/.idea/modules.xml
deleted file mode 100644
index d6f6c5d..0000000
--- a/Demos/RewardedInterstitialDemo/.idea/modules.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Demos/RewardedInterstitialDemo/.idea/runConfigurations.xml b/Demos/RewardedInterstitialDemo/.idea/runConfigurations.xml
deleted file mode 100644
index 7f68460..0000000
--- a/Demos/RewardedInterstitialDemo/.idea/runConfigurations.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Demos/RewardedInterstitialDemo/app/build.gradle b/Demos/RewardedInterstitialDemo/app/build.gradle
index b8989f3..fa86686 100644
--- a/Demos/RewardedInterstitialDemo/app/build.gradle
+++ b/Demos/RewardedInterstitialDemo/app/build.gradle
@@ -1,13 +1,12 @@
apply plugin: 'com.android.application'
android {
- compileSdkVersion 24
- buildToolsVersion "23.0.3"
+ compileSdkVersion 31
defaultConfig {
applicationId "com.adcolony.rewardedinterstitialdemo"
minSdkVersion 14
- targetSdkVersion 24
+ targetSdkVersion 31
versionCode 1
versionName "1.0"
}
@@ -20,7 +19,7 @@ android {
}
dependencies {
- compile 'com.android.support:appcompat-v7:24.2.1'
- compile 'com.adcolony:sdk:3.0.4'
- compile 'com.google.android.gms:play-services-ads:9.4.0'
+ implementation 'androidx.appcompat:appcompat:1.3.1'
+ implementation 'com.adcolony:sdk:4.8.0'
+ implementation 'com.google.android.gms:play-services-ads-identifier:17.1.0'
}
diff --git a/Demos/RewardedInterstitialDemo/app/src/androidTest/java/com/adcolony/rewardedinterstitialdemo/ApplicationTest.java b/Demos/RewardedInterstitialDemo/app/src/androidTest/java/com/adcolony/rewardedinterstitialdemo/ApplicationTest.java
deleted file mode 100644
index 45f5df0..0000000
--- a/Demos/RewardedInterstitialDemo/app/src/androidTest/java/com/adcolony/rewardedinterstitialdemo/ApplicationTest.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.adcolony.rewardedinterstitialdemo;
-
-import android.app.Application;
-import android.test.ApplicationTestCase;
-
-/**
- * Testing Fundamentals
- */
-public class ApplicationTest extends ApplicationTestCase
-{
- public ApplicationTest()
- {
- super( Application.class );
- }
-}
\ No newline at end of file
diff --git a/Demos/RewardedInterstitialDemo/app/src/main/AndroidManifest.xml b/Demos/RewardedInterstitialDemo/app/src/main/AndroidManifest.xml
index 95c482a..16aeb23 100644
--- a/Demos/RewardedInterstitialDemo/app/src/main/AndroidManifest.xml
+++ b/Demos/RewardedInterstitialDemo/app/src/main/AndroidManifest.xml
@@ -1,32 +1,25 @@
-
+
-
-
-
+ android:usesCleartextTraffic="true">
-
+
-
-
+
+
-
-
-
\ No newline at end of file
diff --git a/Demos/RewardedInterstitialDemo/app/src/main/java/com/adcolony/rewardedinterstitialdemo/RewardedInterstitialActivity.java b/Demos/RewardedInterstitialDemo/app/src/main/java/com/adcolony/rewardedinterstitialdemo/RewardedInterstitialActivity.java
index ded8c06..dc6f1b4 100644
--- a/Demos/RewardedInterstitialDemo/app/src/main/java/com/adcolony/rewardedinterstitialdemo/RewardedInterstitialActivity.java
+++ b/Demos/RewardedInterstitialDemo/app/src/main/java/com/adcolony/rewardedinterstitialdemo/RewardedInterstitialActivity.java
@@ -7,138 +7,115 @@
import android.widget.Button;
import android.widget.ProgressBar;
-import com.adcolony.sdk.*;
-
-public class RewardedInterstitialActivity extends Activity
-{
- final private String APP_ID = "app185a7e71e1714831a49ec7";
- final private String ZONE_ID = "vz1fd5a8b2bf6841a0a4b826";
- final private String TAG = "AdColonyDemo";
-
- private Button show_button;
+import com.adcolony.sdk.AdColony;
+import com.adcolony.sdk.AdColonyAdOptions;
+import com.adcolony.sdk.AdColonyAppOptions;
+import com.adcolony.sdk.AdColonyInterstitial;
+import com.adcolony.sdk.AdColonyInterstitialListener;
+import com.adcolony.sdk.AdColonyReward;
+import com.adcolony.sdk.AdColonyRewardListener;
+import com.adcolony.sdk.AdColonyZone;
+
+public class RewardedInterstitialActivity extends Activity {
+
+ private final String APP_ID = "INSERT_YOUR_APP_ID_HERE";
+ private final String ZONE_ID = "INSERT_YOUR_REWARDED_ZONE_ID_HERE";
+ private final String TAG = "AdColonyDemo";
+
+ private Button showButton;
private ProgressBar progress;
private AdColonyInterstitial ad;
private AdColonyInterstitialListener listener;
- private AdColonyAdOptions ad_options;
+ private AdColonyAdOptions adOptions;
@Override
- protected void onCreate( Bundle bundle )
- {
- super.onCreate( bundle );
- setContentView( R.layout.activity_rewarded_interstitial );
- progress = (ProgressBar) findViewById( R.id.progress );
-
- /** Construct optional app options object to be sent with configure */
- AdColonyAppOptions app_options = new AdColonyAppOptions()
- .setUserID( "unique_user_id" );
-
- /**
- * Configure AdColony in your launching Activity's onCreate() method so that cached ads can
- * be available as soon as possible.
- */
- AdColony.configure( this, app_options, APP_ID, ZONE_ID );
-
- /** Optional user metadata sent with the ad options in each request */
- AdColonyUserMetadata metadata = new AdColonyUserMetadata()
- .setUserAge( 26 )
- .setUserEducation( AdColonyUserMetadata.USER_EDUCATION_BACHELORS_DEGREE )
- .setUserGender( AdColonyUserMetadata.USER_MALE );
-
- /** Ad specific options to be sent with request */
- ad_options = new AdColonyAdOptions()
- .enableConfirmationDialog( true )
- .enableResultsDialog( true )
- .setUserMetadata( metadata );
-
- /** Create and set a reward listener */
- AdColony.setRewardListener( new AdColonyRewardListener()
- {
+ protected void onCreate(Bundle bundle) {
+ super.onCreate(bundle);
+ setContentView(R.layout.activity_rewarded_interstitial);
+ progress = findViewById(R.id.progress);
+
+ // Construct optional app options object to be sent with configure
+ AdColonyAppOptions appOptions = new AdColonyAppOptions()
+ .setUserID("unique_user_id")
+ .setKeepScreenOn(true);
+
+ // Configure AdColony in your launching Activity's onCreate() method so that cached ads can
+ // be available as soon as possible.
+ AdColony.configure(this, appOptions, APP_ID);
+
+ // Ad specific options to be sent with request
+ adOptions = new AdColonyAdOptions()
+ .enableConfirmationDialog(true)
+ .enableResultsDialog(true);
+
+ // Create and set a reward listener
+ AdColony.setRewardListener(new AdColonyRewardListener() {
@Override
- public void onReward( AdColonyReward reward )
- {
- /** Query reward object for info here */
- Log.d( TAG, "onReward" );
+ public void onReward(AdColonyReward reward) {
+ // Query reward object for info here
+ Log.d(TAG, "onReward");
}
- } );
-
- /**
- * Set up listener for interstitial ad callbacks. You only need to implement the callbacks
- * that you care about. The only required callback is onRequestFilled, as this is the only
- * way to get an ad object.
- */
- listener = new AdColonyInterstitialListener()
- {
- /** Ad passed back in request filled callback, ad can now be shown */
+ });
+
+ // Set up listener for interstitial ad callbacks. You only need to implement the callbacks
+ // that you care about. The only required callback is onRequestFilled, as this is the only
+ // way to get an ad object.
+ listener = new AdColonyInterstitialListener() {
@Override
- public void onRequestFilled( AdColonyInterstitial ad )
- {
+ public void onRequestFilled(AdColonyInterstitial ad) {
+ // Ad passed back in request filled callback, ad can now be shown
RewardedInterstitialActivity.this.ad = ad;
- show_button.setEnabled( true );
- progress.setVisibility( View.INVISIBLE );
- Log.d( TAG, "onRequestFilled" );
+ showButton.setEnabled(true);
+ progress.setVisibility(View.INVISIBLE);
+ Log.d(TAG, "onRequestFilled");
}
- /** Ad request was not filled */
@Override
- public void onRequestNotFilled( AdColonyZone zone )
- {
- progress.setVisibility( View.INVISIBLE );
- Log.d( TAG, "onRequestNotFilled");
+ public void onRequestNotFilled(AdColonyZone zone) {
+ // Ad request was not filled
+ progress.setVisibility(View.INVISIBLE);
+ Log.d(TAG, "onRequestNotFilled");
}
- /** Ad opened, reset UI to reflect state change */
@Override
- public void onOpened( AdColonyInterstitial ad )
- {
- show_button.setEnabled( false );
- progress.setVisibility( View.VISIBLE );
- Log.d( TAG, "onOpened" );
+ public void onOpened(AdColonyInterstitial ad) {
+ // Ad opened, reset UI to reflect state change
+ showButton.setEnabled(false);
+ progress.setVisibility(View.VISIBLE);
+ Log.d(TAG, "onOpened");
}
- /** Request a new ad if ad is expiring */
@Override
- public void onExpiring( AdColonyInterstitial ad )
- {
- show_button.setEnabled( false );
- progress.setVisibility( View.VISIBLE );
- AdColony.requestInterstitial( ZONE_ID, this, ad_options );
- Log.d( TAG, "onExpiring" );
+ public void onExpiring(AdColonyInterstitial ad) {
+ // Request a new ad if ad is expiring
+ showButton.setEnabled(false);
+ progress.setVisibility(View.VISIBLE);
+ AdColony.requestInterstitial(ZONE_ID, this, adOptions);
+ Log.d(TAG, "onExpiring");
}
};
- /** Set up button to show an ad when clicked */
- show_button = (Button) findViewById( R.id.showbutton );
- show_button.setOnClickListener( new View.OnClickListener()
- {
- @Override
- public void onClick( View view )
- {
- ad.show();
- }
- } );
+ // Set up button to show an ad when clicked
+ showButton = findViewById(R.id.showbutton);
+ showButton.setOnClickListener(view -> ad.show());
}
@Override
- protected void onResume()
- {
+ protected void onResume() {
super.onResume();
- /**
- * It's somewhat arbitrary when your ad request should be made. Here we are simply making
- * a request if there is no valid ad available onResume, but really this can be done at any
- * reasonable time before you plan on showing an ad.
- */
- if (ad == null || ad.isExpired())
- {
- /**
- * Optionally update location info in the ad options for each request:
- * LocationManager location_manager = (LocationManager) getSystemService( Context.LOCATION_SERVICE );
- * Location location = location_manager.getLastKnownLocation( LocationManager.GPS_PROVIDER );
- * ad_options.setUserMetadata( ad_options.getUserMetadata().setUserLocation( location ) );
- */
- progress.setVisibility( View.VISIBLE );
- AdColony.requestInterstitial( ZONE_ID, listener, ad_options );
+ // It's somewhat arbitrary when your ad request should be made. Here we are simply making
+ // a request if there is no valid ad available onResume, but really this can be done at any
+ // reasonable time before you plan on showing an ad.
+ if (ad == null || ad.isExpired()) {
+ // Optionally update location info in the ad options for each request:
+ // LocationManager locationManager =
+ // (LocationManager) getSystemService(Context.LOCATION_SERVICE);
+ // Location location =
+ // locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);
+ // adOptions.setUserMetadata(adOptions.getUserMetadata().setUserLocation(location));
+ progress.setVisibility(View.VISIBLE);
+ AdColony.requestInterstitial(ZONE_ID, listener, adOptions);
}
-
}
}
diff --git a/Demos/RewardedInterstitialDemo/app/src/main/res/layout/activity_rewarded_interstitial.xml b/Demos/RewardedInterstitialDemo/app/src/main/res/layout/activity_rewarded_interstitial.xml
index 723375d..a051030 100644
--- a/Demos/RewardedInterstitialDemo/app/src/main/res/layout/activity_rewarded_interstitial.xml
+++ b/Demos/RewardedInterstitialDemo/app/src/main/res/layout/activity_rewarded_interstitial.xml
@@ -1,47 +1,42 @@
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ tools:context=".RewardedInterstitialActivity"
+ tools:ignore="ContentDescription">
+ android:src="@drawable/background" />
+ android:src="@drawable/text" />
+ android:background="@drawable/buttonxml"
+ android:enabled="false" />
-
-
-
+ android:layout_alignParentRight="true"
+ android:indeterminate="false" />
diff --git a/Demos/RewardedInterstitialDemo/app/src/test/java/com/adcolony/rewardedinterstitialdemo/ExampleUnitTest.java b/Demos/RewardedInterstitialDemo/app/src/test/java/com/adcolony/rewardedinterstitialdemo/ExampleUnitTest.java
deleted file mode 100644
index daab76c..0000000
--- a/Demos/RewardedInterstitialDemo/app/src/test/java/com/adcolony/rewardedinterstitialdemo/ExampleUnitTest.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.adcolony.rewardedinterstitialdemo;
-
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-/**
- * To work on unit tests, switch the Test Artifact in the Build Variants view.
- */
-public class ExampleUnitTest
-{
- @Test
- public void addition_isCorrect() throws Exception
- {
- assertEquals( 4, 2 + 2 );
- }
-}
\ No newline at end of file
diff --git a/Demos/RewardedInterstitialDemo/build.gradle b/Demos/RewardedInterstitialDemo/build.gradle
index 9daee43..34d0146 100644
--- a/Demos/RewardedInterstitialDemo/build.gradle
+++ b/Demos/RewardedInterstitialDemo/build.gradle
@@ -2,10 +2,11 @@
buildscript {
repositories {
- jcenter()
+ google()
+ mavenCentral()
}
dependencies {
- classpath 'com.android.tools.build:gradle:2.2.0'
+ classpath 'com.android.tools.build:gradle:7.0.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
@@ -14,10 +15,8 @@ buildscript {
allprojects {
repositories {
- jcenter()
- maven {
- url "https://adcolony.bintray.com/AdColony"
- }
+ google()
+ mavenCentral()
}
}
diff --git a/Demos/RewardedInterstitialDemo/gradle.properties b/Demos/RewardedInterstitialDemo/gradle.properties
index 1d3591c..915f0e6 100644
--- a/Demos/RewardedInterstitialDemo/gradle.properties
+++ b/Demos/RewardedInterstitialDemo/gradle.properties
@@ -15,4 +15,6 @@
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
-# org.gradle.parallel=true
\ No newline at end of file
+# org.gradle.parallel=true
+android.enableJetifier=true
+android.useAndroidX=true
\ No newline at end of file
diff --git a/Demos/RewardedInterstitialDemo/gradle/wrapper/gradle-wrapper.jar b/Demos/RewardedInterstitialDemo/gradle/wrapper/gradle-wrapper.jar
index 13372ae..f6b961f 100644
Binary files a/Demos/RewardedInterstitialDemo/gradle/wrapper/gradle-wrapper.jar and b/Demos/RewardedInterstitialDemo/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/Demos/RewardedInterstitialDemo/gradle/wrapper/gradle-wrapper.properties b/Demos/RewardedInterstitialDemo/gradle/wrapper/gradle-wrapper.properties
index 447352d..c959522 100644
--- a/Demos/RewardedInterstitialDemo/gradle/wrapper/gradle-wrapper.properties
+++ b/Demos/RewardedInterstitialDemo/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Wed Sep 14 17:18:36 PDT 2016
+#Mon Jul 15 13:10:15 PDT 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
diff --git a/Demos/RewardedInterstitialDemo/gradlew b/Demos/RewardedInterstitialDemo/gradlew
index 9d82f78..cccdd3d 100755
--- a/Demos/RewardedInterstitialDemo/gradlew
+++ b/Demos/RewardedInterstitialDemo/gradlew
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/env sh
##############################################################################
##
@@ -6,20 +6,38 @@
##
##############################################################################
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
-warn ( ) {
+warn () {
echo "$*"
}
-die ( ) {
+die () {
echo
echo "$*"
echo
@@ -30,6 +48,7 @@ die ( ) {
cygwin=false
msys=false
darwin=false
+nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
@@ -40,26 +59,11 @@ case "`uname`" in
MINGW* )
msys=true
;;
+ NONSTOP* )
+ nonstop=true
+ ;;
esac
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
@@ -85,7 +89,7 @@ location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
@@ -150,11 +154,19 @@ if $cygwin ; then
esac
fi
-# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
-function splitJvmOpts() {
- JVM_OPTS=("$@")
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
}
-eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
-JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+APP_ARGS=$(save "$@")
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+ cd "$(dirname "$0")"
+fi
-exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
+exec "$JAVACMD" "$@"
diff --git a/Demos/RewardedInterstitialDemo/gradlew.bat b/Demos/RewardedInterstitialDemo/gradlew.bat
index aec9973..e95643d 100644
--- a/Demos/RewardedInterstitialDemo/gradlew.bat
+++ b/Demos/RewardedInterstitialDemo/gradlew.bat
@@ -8,14 +8,14 @@
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
-
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
@@ -46,10 +46,9 @@ echo location of your Java installation.
goto fail
:init
-@rem Get command-line arguments, handling Windowz variants
+@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
-if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args
@rem Slurp the command line arguments.
@@ -60,11 +59,6 @@ set _SKIP=2
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
-goto execute
-
-:4NT_args
-@rem Get arguments from the 4NT Shell from JP Software
-set CMD_LINE_ARGS=%$
:execute
@rem Setup the command line
diff --git a/Library/adcolony.jar b/Library/adcolony.jar
index 8bd0707..e6d3067 100644
Binary files a/Library/adcolony.jar and b/Library/adcolony.jar differ
diff --git a/Library/arm64-v8a/libadcolony.so b/Library/arm64-v8a/libadcolony.so
deleted file mode 100755
index 5bc05ec..0000000
Binary files a/Library/arm64-v8a/libadcolony.so and /dev/null differ
diff --git a/Library/arm64-v8a/libjs.so b/Library/arm64-v8a/libjs.so
deleted file mode 100755
index 8d0f034..0000000
Binary files a/Library/arm64-v8a/libjs.so and /dev/null differ
diff --git a/Library/armeabi-v7a/libadcolony.so b/Library/armeabi-v7a/libadcolony.so
deleted file mode 100755
index cad51fc..0000000
Binary files a/Library/armeabi-v7a/libadcolony.so and /dev/null differ
diff --git a/Library/armeabi-v7a/libjs.so b/Library/armeabi-v7a/libjs.so
deleted file mode 100755
index db010ed..0000000
Binary files a/Library/armeabi-v7a/libjs.so and /dev/null differ
diff --git a/Library/armeabi/libadcolony.so b/Library/armeabi/libadcolony.so
deleted file mode 100755
index 8cb12bb..0000000
Binary files a/Library/armeabi/libadcolony.so and /dev/null differ
diff --git a/Library/armeabi/libjs.so b/Library/armeabi/libjs.so
deleted file mode 100755
index 7a48f39..0000000
Binary files a/Library/armeabi/libjs.so and /dev/null differ
diff --git a/Library/x86/libadcolony.so b/Library/x86/libadcolony.so
deleted file mode 100755
index 85d4b85..0000000
Binary files a/Library/x86/libadcolony.so and /dev/null differ
diff --git a/Library/x86/libjs.so b/Library/x86/libjs.so
deleted file mode 100755
index 90737fa..0000000
Binary files a/Library/x86/libjs.so and /dev/null differ
diff --git a/Library/x86_64/libadcolony.so b/Library/x86_64/libadcolony.so
deleted file mode 100755
index 7245b7a..0000000
Binary files a/Library/x86_64/libadcolony.so and /dev/null differ
diff --git a/Library/x86_64/libjs.so b/Library/x86_64/libjs.so
deleted file mode 100755
index 56f3d1a..0000000
Binary files a/Library/x86_64/libjs.so and /dev/null differ
diff --git a/README.md b/README.md
index 6ae339b..1c71993 100644
--- a/README.md
+++ b/README.md
@@ -1,63 +1,62 @@
-AdColony Android SDK
-==================================
-Modified: October 11, 2016
-SDK Version: 3.0.4
-
-Getting Started with AdColony:
-----------------------------------
-First time and returning users should review the [documentation](https://github.com/AdColony/AdColony-Android-SDK-3/wiki).
-
-Thanks for joining AdColony on the next step in mobile monetization. We're committed to giving our partners the tools to grow, engage, and monetize successfully. Our Aurora SDK contains huge leaps forward in our capabilities, with benefits for both publishers and advertisers. We would also like to highlight the addition of AdColony Compass™ to our suite of products. AdColony Compass provides publishers with intuitive marketing tools to maximize the value of users throughout your app economy, like creating rewards, achievements, push notifications and in-app messaging.
-
-Please feel free to explore the [Compass Platform](https://github.com/AdColony/AdColony-Android-SDK-3/wiki/Compass-Overview). For more details on how you can take advantage of Compass, please click [here](https://clients.adcolony.com/compass/info).
-
-Updating from Our 2.x SDK:
-----------------------------------
-Updating from our AdColony 2.x SDK is not a drag and drop update, but rather includes breaking API and process changes. Please review our [documentation](https://github.com/AdColony/AdColony-Android-SDK-3/wiki) to get a better idea on what changes will be necessary in your app.
-
-Download:
-----------------------------------
-####Manually:####
-Click the "Download ZIP" button above to download our SDK distribution manually.
-
-####Via Gradle:####
-See the [project setup page](https://github.com/AdColony/AdColony-Android-SDK-3/wiki/Project-Setup) on our Wiki.
-
-Change Logs:
-----------------------------------
-####3.0.4####
-1. Initial public release.
-2. Fixed issue with our x86 builds.
-3. Various stability improvements/bug fixes.
-4. Added messaging features to Compass, which includes both in-app messages and push notifications.
-
-===
-####3.0.3.2####
-1. Support for vertical ads and improved ad orientation controls.
-2. Added armeabi-v7a builds.
-3. Added support for multi-screen.
-4. Changed package name to com.adcolony.sdk.
-5. Removed theme requirement for AdColony Activity manifest declarations.
-
-===
-####3.0.2.2####
-1. Ensure out of date files from earlier SDK installs are invalidated.
-
-===
-####3.0.2.1:####
-1. Added support for native ads.
-2. Added support for in-app purchase promo ads.
-3. Added support for custom messages.
-4. Introduction of AdColony Compass™.
-5. Various stability improvements/bug fixes.
-
-Legal Requirements:
-----------------------------------
+# AdColony Android SDK
+* Modified: June 7th, 2022
+* SDK Version: 4.8.0
+
+## Overview
+AdColony delivers zero-buffering, [full-screen, Instant-Play™ HD video](https://www.adcolony.com/technology/instant-play/), [interactive Aurora™ Video](https://www.adcolony.com/technology/auroravideo/), and Aurora™ Playable ads that can be displayed anywhere within your application. Our advertising SDK is trusted by the world’s top gaming and non-gaming publishers, delivering them the highest monetization opportunities from brand and performance advertisers. AdColony’s SDK can monetize a wide range of ad formats including in-stream/pre-roll, out-stream/interstitial and V4VC™, a secure system for rewarding users of your app with virtual currency upon the completion of video and playable ads.
+
+
+## Release Notes
+
+#### 4.8.0
+
+* Added banner onShow callback
+* Fixed ConcurrentModificationException
+
+**Required update**
+**Due to policy changes from Google, publishers are required to use SDK version 4.4.0 or above.**
+
+*Note: SDK version 4.6.0 and above potentially requires Gradle Plugin version updates. See [this blog post](https://android-developers.googleblog.com/2020/07/preparing-your-build-for-package-visibility-in-android-11.html) for more information.*
+
+Here is the link to the [release notes](https://github.com/AdColony/AdColony-Android-SDK/blob/master/CHANGELOG.md) for all the previous SDK versions.
+
+## Getting Started
+To get started, here is the link to [Android SDK integration documentation](https://github.com/AdColony/AdColony-Android-SDK/wiki).
+
+### Supporting 64-bit on Android
+Version 3.3.7 and above no longer uses the .so libraries and these can be removed from your project. SDK 3.3.7 and above supports 64-bit without the .so libraries.
+
+If you are using using earlier 3.x SDK versions you need to add the proper libadcolony.so and libjs.so architectures to your project to support 64-bit.
+
+## Upgrade
+#### SDK 2.x:
+
+Please note that updating from our 2.x SDK is not a drag and drop update, but rather includes breaking API and process changes. In order to take advantage of the 3.x SDK, a complete re-integration is necessary. Please review our [documentation](https://github.com/AdColony/AdColony-Android-SDK/wiki) to get a better idea on what changes will be necessary in your app.
+
+#### SDK 3.x:
+Update the AdColony library referenced by your project following the steps below:
+
+**Manual**
+
+* Drag and drop the adcolony.jar into your project.
+
+**Via Gradle**
+
+See our [project setup guide](https://github.com/AdColony/AdColony-Android-SDK/wiki/Project-Setup), update your 'dependencies' configuration within your module's build.gradle to point to the latest version:
+
+```
+dependencies {
+ /**
+ * Any other dependencies your module has are placed in this dependency configuration
+ */
+ implementation 'com.adcolony:sdk:4.8.0'
+}
+```
+
+## Legal Requirements
By downloading the AdColony SDK, you are granted a limited, non-commercial license to use and review the SDK solely for evaluation purposes. If you wish to integrate the SDK into any commercial applications, you must register an account with AdColony and accept the terms and conditions on the AdColony website.
Note that U.S. based companies will need to complete the W-9 form and send it to us before publisher payments can be issued.
-
-Contact Us:
-----------------------------------
+## Contact Us
For more information, please visit AdColony.com. For questions or assistance, please email us at support@adcolony.com.