react-native-applovin-max 5.2.0 → 5.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  buildscript {
2
2
  ext.versions = [
3
- 'minSdk' : 16,
3
+ 'minSdk' : 21,
4
4
  'compileSdk' : 29,
5
5
  'targetSdk' : 29,
6
6
  'playServicesIdentifier': "16.0.0",
@@ -35,8 +35,8 @@ android {
35
35
  defaultConfig {
36
36
  minSdkVersion 16
37
37
  targetSdkVersion getExtOrIntegerDefault('targetSdkVersion')
38
- versionCode 5020000
39
- versionName "5.2.0"
38
+ versionCode 5020200
39
+ versionName "5.2.2"
40
40
  }
41
41
 
42
42
  flavorDimensions("default")
@@ -1,6 +1,5 @@
1
1
  package com.applovin.reactnative;
2
2
 
3
- import android.app.Activity;
4
3
  import android.content.Context;
5
4
  import android.text.TextUtils;
6
5
 
@@ -199,13 +198,6 @@ class AppLovinMAXAdView
199
198
 
200
199
  private void maybeAttachAdView()
201
200
  {
202
- final Activity currentActivity = reactContext.getCurrentActivity();
203
- if ( currentActivity == null )
204
- {
205
- AppLovinMAXModule.e( "Unable to attach AdView - no current Activity found" );
206
- return;
207
- }
208
-
209
201
  // Re-assign in case of race condition
210
202
  final String adUnitId = this.adUnitId;
211
203
  final MaxAdFormat adFormat = this.adFormat;
@@ -239,7 +231,7 @@ class AppLovinMAXAdView
239
231
 
240
232
  AppLovinMAXModule.d( "Attaching MaxAdView for " + adUnitId );
241
233
 
242
- adView = new MaxAdView( adUnitId, adFormat, AppLovinMAXModule.getInstance().getSdk(), currentActivity );
234
+ adView = new MaxAdView( adUnitId, adFormat, AppLovinMAXModule.getInstance().getSdk(), reactContext );
243
235
  adView.setListener( this );
244
236
  adView.setRevenueListener( this );
245
237
  adView.setPlacement( placement );
@@ -1274,7 +1274,7 @@ public class AppLovinMAXModule
1274
1274
  promise.resolve( false );
1275
1275
  return;
1276
1276
  }
1277
-
1277
+
1278
1278
  promise.resolve( rewardedAd.isReady() );
1279
1279
  }
1280
1280
 
@@ -2101,7 +2101,7 @@ public class AppLovinMAXModule
2101
2101
  MaxAdView result = mAdViews.get( adUnitId );
2102
2102
  if ( result == null && adViewPosition != null && adViewOffsetPixels != null )
2103
2103
  {
2104
- result = new MaxAdView( adUnitId, adFormat, sdk, maybeGetCurrentActivity() );
2104
+ result = new MaxAdView( adUnitId, adFormat, sdk, getReactApplicationContext() );
2105
2105
  result.setListener( this );
2106
2106
  result.setRevenueListener( this );
2107
2107
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-native-applovin-max",
3
3
  "author": "AppLovin Corporation",
4
- "version": "5.2.0",
4
+ "version": "5.2.2",
5
5
  "description": "AppLovin MAX React Native Plugin for Android and iOS",
6
6
  "homepage": "https://github.com/AppLovin/AppLovin-MAX-React-Native",
7
7
  "license": "MIT",
@@ -11,7 +11,7 @@ Pod::Spec.new do |s|
11
11
  s.authors = package["author"]
12
12
 
13
13
  s.platforms = { :ios => "10.0" }
14
- s.source = { :git => "https://github.com/AppLovin/AppLovin-MAX-React-Native.git", :tag => "release_5_2_0" }
14
+ s.source = { :git => "https://github.com/AppLovin/AppLovin-MAX-React-Native.git", :tag => "release_5_2_2" }
15
15
 
16
16
  s.source_files = "ios/AppLovinMAX*.{h,m}"
17
17
 
package/src/index.js CHANGED
@@ -6,7 +6,7 @@ import EventListeners from "./AppLovinMAXEventListeners";
6
6
 
7
7
  const { AppLovinMAX } = NativeModules;
8
8
 
9
- const VERSION = "5.2.0";
9
+ const VERSION = "5.2.2";
10
10
 
11
11
  /*---------*/
12
12
  /* BANNERS */