@ququplay/admob 8.0.1 → 8.0.3
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.
|
@@ -26,6 +26,8 @@ import com.google.android.gms.ads.AdSize;
|
|
|
26
26
|
import com.google.android.gms.ads.AdView;
|
|
27
27
|
import com.google.android.gms.ads.LoadAdError;
|
|
28
28
|
import com.google.android.gms.common.util.BiConsumer;
|
|
29
|
+
import android.view.Window;
|
|
30
|
+
import androidx.core.view.WindowCompat;
|
|
29
31
|
|
|
30
32
|
public class BannerExecutor extends Executor {
|
|
31
33
|
|
|
@@ -104,7 +106,9 @@ public class BannerExecutor extends Executor {
|
|
|
104
106
|
}
|
|
105
107
|
|
|
106
108
|
// set Safe Area only for Android 15+
|
|
107
|
-
|
|
109
|
+
Window window = activitySupplier.get().getWindow();
|
|
110
|
+
boolean isEdgeToEdge = !WindowCompat.isDecorFitsSystemWindows(window);
|
|
111
|
+
if (isEdgeToEdge) {
|
|
108
112
|
View rootView = activitySupplier.get().getWindow().getDecorView();
|
|
109
113
|
rootView.setOnApplyWindowInsetsListener((v, insets) -> {
|
|
110
114
|
int bottomInset = insets.getSystemWindowInsetBottom();
|
package/android/src/main/java/com/getcapacitor/community/admob/consent/AdConsentExecutor.java
CHANGED
|
@@ -213,24 +213,34 @@ public class AdConsentExecutor extends Executor {
|
|
|
213
213
|
}
|
|
214
214
|
|
|
215
215
|
ensureConsentInfo();
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
216
|
+
activitySupplier
|
|
217
|
+
.get()
|
|
218
|
+
.runOnUiThread(() ->
|
|
219
|
+
UserMessagingPlatform.loadConsentForm(
|
|
220
|
+
contextSupplier.get(),
|
|
221
|
+
(consentForm) ->
|
|
222
|
+
consentForm.show(activitySupplier.get(), (formError) -> {
|
|
223
|
+
if (formError != null) {
|
|
224
|
+
call.reject("Error when show consent form", formError.getMessage());
|
|
225
|
+
} else {
|
|
226
|
+
JSObject consentFormInfo = new JSObject();
|
|
227
|
+
consentFormInfo.put("status", getConsentStatusString(consentInformation.getConsentStatus()));
|
|
228
|
+
consentFormInfo.put("isConsentFormAvailable", consentInformation.isConsentFormAvailable());
|
|
229
|
+
consentFormInfo.put("canRequestAds", consentInformation.canRequestAds());
|
|
230
|
+
consentFormInfo.put(
|
|
231
|
+
"privacyOptionsRequirementStatus",
|
|
232
|
+
consentInformation.getPrivacyOptionsRequirementStatus().name()
|
|
233
|
+
);
|
|
234
|
+
consentFormInfo.put("canShowAds", canShowAds());
|
|
235
|
+
consentFormInfo.put("canShowPersonalizedAds", canShowPersonalizedAds());
|
|
236
|
+
consentFormInfo.put("isConsentOutdated", isConsentOutdated());
|
|
237
|
+
|
|
238
|
+
call.resolve(consentFormInfo);
|
|
239
|
+
}
|
|
240
|
+
}),
|
|
241
|
+
(formError) -> call.reject("Error when show consent form", formError.getMessage())
|
|
242
|
+
)
|
|
243
|
+
);
|
|
234
244
|
} catch (Exception ex) {
|
|
235
245
|
call.reject(ex.getLocalizedMessage(), ex);
|
|
236
246
|
}
|
package/package.json
CHANGED