react-native-applovin-max 4.1.6 → 5.0.0
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.
- package/android/build.gradle +2 -12
- package/android/gradle.properties +0 -1
- package/android/src/main/java/com/applovin/reactnative/AppLovinMAXAdView.java +85 -23
- package/android/src/main/java/com/applovin/reactnative/AppLovinMAXAdViewManager.java +39 -11
- package/android/src/main/java/com/applovin/reactnative/AppLovinMAXModule.java +712 -229
- package/android/src/main/java/com/applovin/reactnative/AppLovinMAXNativeAdView.java +107 -39
- package/android/src/main/java/com/applovin/reactnative/AppLovinMAXNativeAdViewManager.java +17 -7
- package/ios/AppLovinMAX.h +22 -2
- package/ios/AppLovinMAX.m +587 -187
- package/ios/AppLovinMAXAdView.m +43 -12
- package/ios/AppLovinMAXAdViewManager.m +10 -0
- package/ios/AppLovinMAXNativeAdView.m +86 -41
- package/ios/AppLovinMAXNativeAdViewManager.m +7 -3
- package/package.json +1 -1
- package/react-native-applovin-max.podspec +1 -1
- package/src/AppLovinMAXAdView.js +163 -62
- package/src/AppLovinMAXEventListeners.js +419 -0
- package/src/NativeAdComponents.js +39 -46
- package/src/NativeAdView.js +79 -34
- package/src/TargetingData.js +35 -3
- package/src/index.js +115 -336
package/src/index.js
CHANGED
|
@@ -1,283 +1,62 @@
|
|
|
1
|
-
import { NativeModules
|
|
1
|
+
import { NativeModules } from "react-native";
|
|
2
2
|
import AdView, { AdFormat, AdViewPosition } from "./AppLovinMAXAdView";
|
|
3
3
|
import { TargetingData, AdContentRating, UserGender } from "./TargetingData";
|
|
4
4
|
import NativeAdView from "./NativeAdView";
|
|
5
|
+
import EventListeners from "./AppLovinMAXEventListeners";
|
|
5
6
|
|
|
6
7
|
const { AppLovinMAX } = NativeModules;
|
|
7
8
|
|
|
8
|
-
const VERSION = "
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* This enum represents whether or not the consent dialog should be shown for this user.
|
|
12
|
-
* The state where no such determination could be made is represented by `Unknown`.
|
|
13
|
-
*/
|
|
14
|
-
const ConsentDialogState = {
|
|
15
|
-
/**
|
|
16
|
-
* The consent dialog state could not be determined. This is likely due to SDK failing to initialize.
|
|
17
|
-
*/
|
|
18
|
-
UNKNOWN: 0,
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* This user should be shown a consent dialog.
|
|
22
|
-
*/
|
|
23
|
-
APPLIES: 1,
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* This user should not be shown a consent dialog.
|
|
27
|
-
*/
|
|
28
|
-
DOES_NOT_APPLY: 2,
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
const emitter = new NativeEventEmitter(AppLovinMAX);
|
|
32
|
-
const subscriptions = {};
|
|
33
|
-
|
|
34
|
-
const addEventListener = (event, handler) => {
|
|
35
|
-
let subscription = emitter.addListener(event, handler);
|
|
36
|
-
let currentSubscription = subscriptions[event];
|
|
37
|
-
if (currentSubscription) {
|
|
38
|
-
currentSubscription.remove();
|
|
39
|
-
}
|
|
40
|
-
subscriptions[event] = subscription;
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
const removeEventListener = (event) => {
|
|
44
|
-
let currentSubscription = subscriptions[event];
|
|
45
|
-
if (currentSubscription) {
|
|
46
|
-
currentSubscription.remove();
|
|
47
|
-
delete subscriptions[event];
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
const logUninitializedAccessError = (callingMethod) => {
|
|
52
|
-
console.warn( "ERROR: Failed to execute " + callingMethod + "() - please ensure the AppLovin MAX React Native module has been initialized by calling 'AppLovinMAX.initialize(...);'!" );
|
|
53
|
-
}
|
|
9
|
+
const VERSION = "5.0.0";
|
|
54
10
|
|
|
55
11
|
/*---------*/
|
|
56
12
|
/* BANNERS */
|
|
57
13
|
/*---------*/
|
|
58
14
|
|
|
59
|
-
const createBanner = (adUnitId, bannerPosition) => {
|
|
60
|
-
if (!AppLovinMAX.isInitialized()) {
|
|
61
|
-
logUninitializedAccessError('createBanner');
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
AppLovinMAX.createBanner(adUnitId, bannerPosition);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
const createBannerWithOffsets = (adUnitId, bannerPosition, xOffset, yOffset) => {
|
|
68
|
-
if (!AppLovinMAX.isInitialized()) {
|
|
69
|
-
logUninitializedAccessError('createBannerWithOffsets');
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
AppLovinMAX.createBannerWithOffsets(adUnitId, bannerPosition, xOffset, yOffset);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
const setBannerBackgroundColor = (adUnitId, hexColorCode) => {
|
|
76
|
-
if (!AppLovinMAX.isInitialized()) {
|
|
77
|
-
logUninitializedAccessError('setBannerBackgroundColor');
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
AppLovinMAX.setBannerBackgroundColor(adUnitId, hexColorCode);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
const setBannerPlacement = (adUnitId, placement) => {
|
|
84
|
-
if (!AppLovinMAX.isInitialized()) {
|
|
85
|
-
logUninitializedAccessError('setBannerPlacement');
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
AppLovinMAX.setBannerPlacement(adUnitId, placement);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
const setBannerWidth = (adUnitId, width) => {
|
|
92
|
-
if (!AppLovinMAX.isInitialized()) {
|
|
93
|
-
logUninitializedAccessError('setBannerWidth');
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
AppLovinMAX.setBannerWidth(adUnitId, width);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
const updateBannerPosition = (adUnitId, bannerPosition) => {
|
|
100
|
-
if (!AppLovinMAX.isInitialized()) {
|
|
101
|
-
logUninitializedAccessError('updateBannerPosition');
|
|
102
|
-
return;
|
|
103
|
-
}
|
|
104
|
-
AppLovinMAX.updateBannerPosition(adUnitId, bannerPosition);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
const updateBannerOffsets = (adUnitId, xOffset, yOffset) => {
|
|
108
|
-
if (!AppLovinMAX.isInitialized()) {
|
|
109
|
-
logUninitializedAccessError('updateBannerOffsets');
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
|
-
AppLovinMAX.updateBannerOffsets(adUnitId, xOffset, yOffset);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
15
|
const setBannerExtraParameter = (adUnitId, key, value) => {
|
|
116
|
-
if (
|
|
117
|
-
|
|
118
|
-
return;
|
|
119
|
-
}
|
|
120
|
-
AppLovinMAX.setBannerExtraParameter(adUnitId, key, value);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
const startBannerAutoRefresh = (adUnitId) => {
|
|
124
|
-
if (!AppLovinMAX.isInitialized()) {
|
|
125
|
-
logUninitializedAccessError('startBannerAutoRefresh');
|
|
126
|
-
return;
|
|
127
|
-
}
|
|
128
|
-
AppLovinMAX.startBannerAutoRefresh(adUnitId);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
const stopBannerAutoRefresh = (adUnitId) => {
|
|
132
|
-
if (!AppLovinMAX.isInitialized()) {
|
|
133
|
-
logUninitializedAccessError('stopBannerAutoRefresh');
|
|
16
|
+
if ((value !== null) && (value !== undefined) && (typeof value !== 'string')) {
|
|
17
|
+
console.warn("setBannerExtraParameter() supports only string values: " + value);
|
|
134
18
|
return;
|
|
135
19
|
}
|
|
136
|
-
AppLovinMAX.stopBannerAutoRefresh(adUnitId);
|
|
137
|
-
}
|
|
138
20
|
|
|
139
|
-
|
|
140
|
-
if (!AppLovinMAX.isInitialized()) {
|
|
141
|
-
logUninitializedAccessError('showBanner');
|
|
142
|
-
return;
|
|
143
|
-
}
|
|
144
|
-
AppLovinMAX.showBanner(adUnitId);
|
|
21
|
+
AppLovinMAX.setBannerExtraParameter(adUnitId, key, value);
|
|
145
22
|
}
|
|
146
23
|
|
|
147
|
-
const
|
|
148
|
-
if (
|
|
149
|
-
|
|
24
|
+
const setBannerLocalExtraParameter = (adUnitId, key, value) => {
|
|
25
|
+
if ((value !== null) && (value !== undefined) && (typeof value !== 'string')) {
|
|
26
|
+
console.warn("setBannerLocalExtraParameter() supports only string values: " + value);
|
|
150
27
|
return;
|
|
151
28
|
}
|
|
152
|
-
AppLovinMAX.hideBanner(adUnitId);
|
|
153
|
-
}
|
|
154
29
|
|
|
155
|
-
|
|
156
|
-
if (!AppLovinMAX.isInitialized()) {
|
|
157
|
-
logUninitializedAccessError('destroyBanner');
|
|
158
|
-
return;
|
|
159
|
-
}
|
|
160
|
-
AppLovinMAX.destroyBanner(adUnitId);
|
|
30
|
+
AppLovinMAX.setBannerLocalExtraParameter(adUnitId, key, value);
|
|
161
31
|
}
|
|
162
32
|
|
|
163
33
|
/*-------*/
|
|
164
34
|
/* MRECS */
|
|
165
35
|
/*-------*/
|
|
166
36
|
|
|
167
|
-
const createMRec = (adUnitId, mrecPosition) => {
|
|
168
|
-
if (!AppLovinMAX.isInitialized()) {
|
|
169
|
-
logUninitializedAccessError('createMRec');
|
|
170
|
-
return;
|
|
171
|
-
}
|
|
172
|
-
AppLovinMAX.createMRec(adUnitId, mrecPosition);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
const setMRecBackgroundColor = (adUnitId, hexColorCode) => {
|
|
176
|
-
if (!AppLovinMAX.isInitialized()) {
|
|
177
|
-
logUninitializedAccessError('setMRecBackgroundColor');
|
|
178
|
-
return;
|
|
179
|
-
}
|
|
180
|
-
AppLovinMAX.setMRecBackgroundColor(adUnitId, hexColorCode);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
const setMRecPlacement = (adUnitId, placement) => {
|
|
184
|
-
if (!AppLovinMAX.isInitialized()) {
|
|
185
|
-
logUninitializedAccessError('setMRecPlacement');
|
|
186
|
-
return;
|
|
187
|
-
}
|
|
188
|
-
AppLovinMAX.setMRecPlacement(adUnitId, placement);
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
const setMRecCustomData = (adUnitId, customData) => {
|
|
192
|
-
if (!AppLovinMAX.isInitialized()) {
|
|
193
|
-
logUninitializedAccessError('setMRecCustomData');
|
|
194
|
-
return;
|
|
195
|
-
}
|
|
196
|
-
AppLovinMAX.setMRecCustomData(adUnitId, customData);
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
const updateMRecPosition = (adUnitId, mrecPosition) => {
|
|
200
|
-
if (!AppLovinMAX.isInitialized()) {
|
|
201
|
-
logUninitializedAccessError('updateMRecPosition');
|
|
202
|
-
return;
|
|
203
|
-
}
|
|
204
|
-
AppLovinMAX.updateMRecPosition(adUnitId, mrecPosition);
|
|
205
|
-
}
|
|
206
|
-
|
|
207
37
|
const setMRecExtraParameter = (adUnitId, key, value) => {
|
|
208
|
-
if (
|
|
209
|
-
|
|
38
|
+
if ((value !== null) && (value !== undefined) && (typeof value !== 'string')) {
|
|
39
|
+
console.warn("setMRecExtraParameter() supports only string values: " + value);
|
|
210
40
|
return;
|
|
211
41
|
}
|
|
212
|
-
AppLovinMAX.setMRecExtraParameter(adUnitId, key, value);
|
|
213
|
-
}
|
|
214
42
|
|
|
215
|
-
|
|
216
|
-
if (!AppLovinMAX.isInitialized()) {
|
|
217
|
-
logUninitializedAccessError('startMRecAutoRefresh');
|
|
218
|
-
return;
|
|
219
|
-
}
|
|
220
|
-
AppLovinMAX.startMRecAutoRefresh(adUnitId);
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
const stopMRecAutoRefresh = (adUnitId) => {
|
|
224
|
-
if (!AppLovinMAX.isInitialized()) {
|
|
225
|
-
logUninitializedAccessError('stopMRecAutoRefresh');
|
|
226
|
-
return;
|
|
227
|
-
}
|
|
228
|
-
AppLovinMAX.stopMRecAutoRefresh(adUnitId);
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
const showMRec = (adUnitId) => {
|
|
232
|
-
if (!AppLovinMAX.isInitialized()) {
|
|
233
|
-
logUninitializedAccessError('showMRec');
|
|
234
|
-
return;
|
|
235
|
-
}
|
|
236
|
-
AppLovinMAX.showMRec(adUnitId);
|
|
43
|
+
AppLovinMAX.setMRecExtraParameter(adUnitId, key, value);
|
|
237
44
|
}
|
|
238
45
|
|
|
239
|
-
const
|
|
240
|
-
if (
|
|
241
|
-
|
|
46
|
+
const setMRecLocalExtraParameter = (adUnitId, key, value) => {
|
|
47
|
+
if ((value !== null) && (value !== undefined) && (typeof value !== 'string')) {
|
|
48
|
+
console.warn("setMRecLocalExtraParameter() supports only string values: " + value);
|
|
242
49
|
return;
|
|
243
50
|
}
|
|
244
|
-
AppLovinMAX.hideMRec(adUnitId);
|
|
245
|
-
}
|
|
246
51
|
|
|
247
|
-
|
|
248
|
-
if (!AppLovinMAX.isInitialized()) {
|
|
249
|
-
logUninitializedAccessError('destroyMRec');
|
|
250
|
-
return;
|
|
251
|
-
}
|
|
252
|
-
AppLovinMAX.destroyMRec(adUnitId);
|
|
52
|
+
AppLovinMAX.setMRecLocalExtraParameter(adUnitId, key, value);
|
|
253
53
|
}
|
|
254
54
|
|
|
255
55
|
/*---------------*/
|
|
256
56
|
/* INTERSTITIALS */
|
|
257
57
|
/*---------------*/
|
|
258
58
|
|
|
259
|
-
const loadInterstitial = (adUnitId) => {
|
|
260
|
-
if (!AppLovinMAX.isInitialized()) {
|
|
261
|
-
logUninitializedAccessError('loadInterstitial');
|
|
262
|
-
return;
|
|
263
|
-
}
|
|
264
|
-
AppLovinMAX.loadInterstitial(adUnitId);
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
const isInterstitialReady = (adUnitId) => {
|
|
268
|
-
if (!AppLovinMAX.isInitialized()) {
|
|
269
|
-
logUninitializedAccessError('isInterstitialReady');
|
|
270
|
-
return false;
|
|
271
|
-
}
|
|
272
|
-
return AppLovinMAX.isInterstitialReady(adUnitId);
|
|
273
|
-
}
|
|
274
|
-
|
|
275
59
|
const showInterstitial = (adUnitId, ...args) => {
|
|
276
|
-
if (!AppLovinMAX.isInitialized()) {
|
|
277
|
-
logUninitializedAccessError('showInterstitial');
|
|
278
|
-
return;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
60
|
switch (args.length) {
|
|
282
61
|
case 0:
|
|
283
62
|
AppLovinMAX.showInterstitial(adUnitId, null, null);
|
|
@@ -295,39 +74,28 @@ const showInterstitial = (adUnitId, ...args) => {
|
|
|
295
74
|
};
|
|
296
75
|
|
|
297
76
|
const setInterstitialExtraParameter = (adUnitId, key, value) => {
|
|
298
|
-
if (
|
|
299
|
-
|
|
77
|
+
if ((value !== null) && (value !== undefined) && (typeof value !== 'string')) {
|
|
78
|
+
console.warn("setInterstitialExtraParameter() supports only string values: " + value);
|
|
300
79
|
return;
|
|
301
80
|
}
|
|
81
|
+
|
|
302
82
|
AppLovinMAX.setInterstitialExtraParameter(adUnitId, key, value);
|
|
303
83
|
}
|
|
304
84
|
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
const loadRewardedAd = (adUnitId) => {
|
|
310
|
-
if (!AppLovinMAX.isInitialized()) {
|
|
311
|
-
logUninitializedAccessError('loadRewardedAd');
|
|
85
|
+
const setInterstitialLocalExtraParameter = (adUnitId, key, value) => {
|
|
86
|
+
if ((value !== null) && (value !== undefined) && (typeof value !== 'string')) {
|
|
87
|
+
console.warn("setInterstitialLocalExtraParameter() supports only string values: " + value);
|
|
312
88
|
return;
|
|
313
89
|
}
|
|
314
|
-
AppLovinMAX.loadRewardedAd(adUnitId);
|
|
315
|
-
}
|
|
316
90
|
|
|
317
|
-
|
|
318
|
-
if (!AppLovinMAX.isInitialized()) {
|
|
319
|
-
logUninitializedAccessError('isRewardedAdReady');
|
|
320
|
-
return false;
|
|
321
|
-
}
|
|
322
|
-
return AppLovinMAX.isRewardedAdReady(adUnitId);
|
|
91
|
+
AppLovinMAX.setInterstitialLocalExtraParameter(adUnitId, key, value);
|
|
323
92
|
}
|
|
324
93
|
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
return;
|
|
329
|
-
}
|
|
94
|
+
/*----------*/
|
|
95
|
+
/* REWARDED */
|
|
96
|
+
/*----------*/
|
|
330
97
|
|
|
98
|
+
const showRewardedAd = (adUnitId, ...args) => {
|
|
331
99
|
switch (args.length) {
|
|
332
100
|
case 0:
|
|
333
101
|
AppLovinMAX.showRewardedAd(adUnitId, null, null);
|
|
@@ -345,39 +113,28 @@ const showRewardedAd = (adUnitId, ...args) => {
|
|
|
345
113
|
};
|
|
346
114
|
|
|
347
115
|
const setRewardedAdExtraParameter = (adUnitId, key, value) => {
|
|
348
|
-
if (
|
|
349
|
-
|
|
116
|
+
if ((value !== null) && (value !== undefined) && (typeof value !== 'string')) {
|
|
117
|
+
console.warn("setRewardedAdExtraParameter() supports only string values: " + value);
|
|
350
118
|
return;
|
|
351
119
|
}
|
|
120
|
+
|
|
352
121
|
AppLovinMAX.setRewardedAdExtraParameter(adUnitId, key, value);
|
|
353
122
|
}
|
|
354
123
|
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
const loadAppOpenAd = (adUnitId) => {
|
|
360
|
-
if (!AppLovinMAX.isInitialized()) {
|
|
361
|
-
logUninitializedAccessError('loadAppOpenAd');
|
|
124
|
+
const setRewardedAdLocalExtraParameter = (adUnitId, key, value) => {
|
|
125
|
+
if ((value !== null) && (value !== undefined) && (typeof value !== 'string')) {
|
|
126
|
+
console.warn("setRewardedAdLocalExtraParameter() supports only string values: " + value);
|
|
362
127
|
return;
|
|
363
128
|
}
|
|
364
|
-
AppLovinMAX.loadAppOpenAd(adUnitId);
|
|
365
|
-
}
|
|
366
129
|
|
|
367
|
-
|
|
368
|
-
if (!AppLovinMAX.isInitialized()) {
|
|
369
|
-
logUninitializedAccessError('isAppOpenAdReady');
|
|
370
|
-
return false;
|
|
371
|
-
}
|
|
372
|
-
return AppLovinMAX.isAppOpenAdReady(adUnitId);
|
|
130
|
+
AppLovinMAX.setRewardedAdLocalExtraParameter(adUnitId, key, value);
|
|
373
131
|
}
|
|
374
132
|
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
return;
|
|
379
|
-
}
|
|
133
|
+
/*----------*/
|
|
134
|
+
/* APP OPEN */
|
|
135
|
+
/*----------*/
|
|
380
136
|
|
|
137
|
+
const showAppOpenAd = (adUnitId, ...args) => {
|
|
381
138
|
switch (args.length) {
|
|
382
139
|
case 0:
|
|
383
140
|
AppLovinMAX.showAppOpenAd(adUnitId, null, null);
|
|
@@ -395,97 +152,71 @@ const showAppOpenAd = (adUnitId, ...args) => {
|
|
|
395
152
|
};
|
|
396
153
|
|
|
397
154
|
const setAppOpenAdExtraParameter = (adUnitId, key, value) => {
|
|
398
|
-
if (
|
|
399
|
-
|
|
155
|
+
if ((value !== null) && (value !== undefined) && (typeof value !== 'string')) {
|
|
156
|
+
console.warn("setAppOpenAdExtraParameter() supports only string values: " + value);
|
|
400
157
|
return;
|
|
401
158
|
}
|
|
159
|
+
|
|
402
160
|
AppLovinMAX.setAppOpenAdExtraParameter(adUnitId, key, value);
|
|
403
161
|
}
|
|
404
162
|
|
|
405
|
-
const
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
163
|
+
const setAppOpenAdLocalExtraParameter = (adUnitId, key, value) => {
|
|
164
|
+
if ((value !== null) && (value !== undefined) && (typeof value !== 'string')) {
|
|
165
|
+
console.warn("setAppOpenAdLocalExtraParameter() supports only string values: " + value);
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
AppLovinMAX.setAppOpenAdLocalExtraParameter(adUnitId, key, value);
|
|
170
|
+
}
|
|
409
171
|
|
|
410
172
|
export default {
|
|
411
173
|
...AppLovinMAX,
|
|
174
|
+
...EventListeners,
|
|
412
175
|
AdView,
|
|
413
176
|
get targetingData() {
|
|
414
177
|
return TargetingData;
|
|
415
178
|
},
|
|
416
179
|
AdContentRating,
|
|
417
180
|
UserGender,
|
|
418
|
-
ConsentDialogState,
|
|
419
181
|
AdViewPosition,
|
|
420
182
|
AdFormat,
|
|
421
183
|
NativeAdView,
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
// Use callback to avoid need for attaching listeners at top level on each re-render
|
|
425
|
-
initialize(sdkKey, callback) {
|
|
426
|
-
AppLovinMAX.initialize(VERSION, sdkKey, callback); // Inject VERSION into native code
|
|
184
|
+
initialize(sdkKey) {
|
|
185
|
+
return AppLovinMAX.initialize(VERSION, sdkKey);
|
|
427
186
|
},
|
|
428
187
|
|
|
429
188
|
/*---------*/
|
|
430
189
|
/* BANNERS */
|
|
431
190
|
/*---------*/
|
|
432
|
-
createBanner,
|
|
433
|
-
createBannerWithOffsets,
|
|
434
|
-
setBannerBackgroundColor,
|
|
435
|
-
setBannerPlacement,
|
|
436
|
-
setBannerWidth,
|
|
437
|
-
updateBannerPosition,
|
|
438
|
-
updateBannerOffsets,
|
|
439
191
|
setBannerExtraParameter,
|
|
440
|
-
|
|
441
|
-
stopBannerAutoRefresh,
|
|
442
|
-
showBanner,
|
|
443
|
-
hideBanner,
|
|
444
|
-
destroyBanner,
|
|
192
|
+
setBannerLocalExtraParameter,
|
|
445
193
|
|
|
446
194
|
/*-------*/
|
|
447
195
|
/* MRECS */
|
|
448
196
|
/*-------*/
|
|
449
|
-
createMRec,
|
|
450
|
-
setMRecBackgroundColor,
|
|
451
|
-
setMRecPlacement,
|
|
452
|
-
setMRecCustomData,
|
|
453
|
-
updateMRecPosition,
|
|
454
197
|
setMRecExtraParameter,
|
|
455
|
-
|
|
456
|
-
stopMRecAutoRefresh,
|
|
457
|
-
showMRec,
|
|
458
|
-
hideMRec,
|
|
459
|
-
destroyMRec,
|
|
198
|
+
setMRecLocalExtraParameter,
|
|
460
199
|
|
|
461
200
|
/*---------------*/
|
|
462
201
|
/* INTERSTITIALS */
|
|
463
202
|
/*---------------*/
|
|
464
|
-
loadInterstitial,
|
|
465
|
-
isInterstitialReady,
|
|
466
203
|
showInterstitial,
|
|
467
204
|
setInterstitialExtraParameter,
|
|
205
|
+
setInterstitialLocalExtraParameter,
|
|
468
206
|
|
|
469
207
|
/*----------*/
|
|
470
208
|
/* REWARDED */
|
|
471
209
|
/*----------*/
|
|
472
|
-
loadRewardedAd,
|
|
473
|
-
isRewardedAdReady,
|
|
474
210
|
showRewardedAd,
|
|
475
211
|
setRewardedAdExtraParameter,
|
|
212
|
+
setRewardedAdLocalExtraParameter,
|
|
476
213
|
|
|
477
214
|
/*----------*/
|
|
478
215
|
/* APP OPEN */
|
|
479
216
|
/*----------*/
|
|
480
|
-
loadAppOpenAd,
|
|
481
|
-
isAppOpenAdReady,
|
|
482
217
|
showAppOpenAd,
|
|
483
218
|
setAppOpenAdExtraParameter,
|
|
484
|
-
|
|
485
|
-
/*--------------------------------------------------*/
|
|
486
|
-
/* DEPRECATED (will be removed in a future release) */
|
|
487
|
-
/*--------------------------------------------------*/
|
|
488
|
-
getConsentDialogState,
|
|
219
|
+
setAppOpenAdLocalExtraParameter,
|
|
489
220
|
|
|
490
221
|
/*----------------------*/
|
|
491
222
|
/** AUTO-DECLARED APIs **/
|
|
@@ -494,28 +225,28 @@ export default {
|
|
|
494
225
|
/*----------------*/
|
|
495
226
|
/* INITIALIZATION */
|
|
496
227
|
/*----------------*/
|
|
497
|
-
/* isInitialized() */
|
|
498
|
-
/* initialize(pluginVersion, sdkKey,
|
|
228
|
+
/* isInitialized(promise) */
|
|
229
|
+
/* initialize(pluginVersion, sdkKey, promise) */
|
|
499
230
|
|
|
500
231
|
/*--------------*/
|
|
501
232
|
/* PRIVACY APIs */
|
|
502
233
|
/*--------------*/
|
|
503
|
-
/* showConsentDialog(
|
|
234
|
+
/* showConsentDialog(promise) */
|
|
504
235
|
/* setHasUserConsent(hasUserConsent) */
|
|
505
|
-
/* hasUserConsent() */
|
|
236
|
+
/* hasUserConsent(promise) */
|
|
506
237
|
/* setIsAgeRestrictedUser(isAgeRestrictedUser) */
|
|
507
|
-
/* isAgeRestrictedUser() */
|
|
238
|
+
/* isAgeRestrictedUser(promise) */
|
|
508
239
|
/* setDoNotSell(doNotSell) */
|
|
509
|
-
/* isDoNotSell() */
|
|
240
|
+
/* isDoNotSell(promise) */
|
|
510
241
|
|
|
511
242
|
/*--------------------*/
|
|
512
243
|
/* GENERAL PUBLIC API */
|
|
513
244
|
/*--------------------*/
|
|
514
245
|
/* showMediationDebugger() */
|
|
515
|
-
/* isTablet() */
|
|
246
|
+
/* isTablet(promise) */
|
|
516
247
|
/* setUserId(userId) */
|
|
517
248
|
/* setMuted(muted) */
|
|
518
|
-
/* isMuted() */
|
|
249
|
+
/* isMuted(promise) */
|
|
519
250
|
/* setVerboseLogging(verboseLoggingEnabled) */
|
|
520
251
|
/* setTestDeviceAdvertisingIds(advertisingIds) */
|
|
521
252
|
/* setCreativeDebuggerEnabled(enabled) */
|
|
@@ -525,6 +256,54 @@ export default {
|
|
|
525
256
|
/* setTermsOfServiceUrl(urlString) */
|
|
526
257
|
/* setLocationCollectionEnabled(locationCollectionEnabled) */
|
|
527
258
|
|
|
259
|
+
/*---------*/
|
|
260
|
+
/* BANNERS */
|
|
261
|
+
/*---------*/
|
|
262
|
+
/* createBanner */
|
|
263
|
+
/* createBannerWithOffsets */
|
|
264
|
+
/* setBannerBackgroundColor */
|
|
265
|
+
/* setBannerPlacement */
|
|
266
|
+
/* setBannerWidth */
|
|
267
|
+
/* updateBannerPosition */
|
|
268
|
+
/* updateBannerOffsets */
|
|
269
|
+
/* startBannerAutoRefresh */
|
|
270
|
+
/* stopBannerAutoRefresh */
|
|
271
|
+
/* showBanner */
|
|
272
|
+
/* hideBanner */
|
|
273
|
+
/* destroyBanner */
|
|
274
|
+
|
|
275
|
+
/*-------*/
|
|
276
|
+
/* MRECS */
|
|
277
|
+
/*-------*/
|
|
278
|
+
/* createMRec */
|
|
279
|
+
/* setMRecBackgroundColor */
|
|
280
|
+
/* setMRecPlacement */
|
|
281
|
+
/* setMRecCustomData */
|
|
282
|
+
/* updateMRecPosition */
|
|
283
|
+
/* startMRecAutoRefresh */
|
|
284
|
+
/* stopMRecAutoRefresh */
|
|
285
|
+
/* showMRec */
|
|
286
|
+
/* hideMRec */
|
|
287
|
+
/* destroyMRec */
|
|
288
|
+
|
|
289
|
+
/*---------------*/
|
|
290
|
+
/* INTERSTITIALS */
|
|
291
|
+
/*---------------*/
|
|
292
|
+
/* loadInterstitial */
|
|
293
|
+
/* isInterstitialReady */
|
|
294
|
+
|
|
295
|
+
/*----------*/
|
|
296
|
+
/* REWARDED */
|
|
297
|
+
/*----------*/
|
|
298
|
+
/* loadRewardedAd */
|
|
299
|
+
/* isRewardedAdReady */
|
|
300
|
+
|
|
301
|
+
/*----------*/
|
|
302
|
+
/* APP OPEN */
|
|
303
|
+
/*----------*/
|
|
304
|
+
/* loadAppOpenAd */
|
|
305
|
+
/* isAppOpenAdReady */
|
|
306
|
+
|
|
528
307
|
/*----------------*/
|
|
529
308
|
/* EVENT TRACKING */
|
|
530
309
|
/*----------------*/
|
|
@@ -533,5 +312,5 @@ export default {
|
|
|
533
312
|
/*---------*/
|
|
534
313
|
/* BANNERS */
|
|
535
314
|
/*---------*/
|
|
536
|
-
/* getAdaptiveBannerHeightForWidth(width) */
|
|
315
|
+
/* getAdaptiveBannerHeightForWidth(width, promise) */
|
|
537
316
|
};
|