@ququplay/admob 8.0.0 → 8.0.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.
@@ -213,24 +213,31 @@ public class AdConsentExecutor extends Executor {
213
213
  }
214
214
 
215
215
  ensureConsentInfo();
216
- activity.runOnUiThread(() ->
217
- UserMessagingPlatform.loadAndShowConsentFormIfRequired(activity, (formError) -> {
218
- if (formError != null) {
219
- call.reject("Error when show consent form", formError.getMessage());
220
- return;
221
- }
222
-
223
- JSObject consentFormInfo = new JSObject();
224
- consentFormInfo.put("status", getConsentStatusString(consentInformation.getConsentStatus()));
225
- consentFormInfo.put("isConsentFormAvailable", consentInformation.isConsentFormAvailable());
226
- consentFormInfo.put("canShowAds", canShowAds());
227
- consentFormInfo.put("canShowPersonalizedAds", canShowPersonalizedAds());
228
- consentFormInfo.put("isConsentOutdated", isConsentOutdated());
229
- consentFormInfo.put("canRequestAds", consentInformation.canRequestAds());
230
- consentFormInfo.put("privacyOptionsRequirementStatus", consentInformation.getPrivacyOptionsRequirementStatus().name());
231
- call.resolve(consentFormInfo);
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("privacyOptionsRequirementStatus", consentInformation.getPrivacyOptionsRequirementStatus().name());
231
+ consentFormInfo.put("canShowAds", canShowAds());
232
+ consentFormInfo.put("canShowPersonalizedAds", canShowPersonalizedAds());
233
+ consentFormInfo.put("isConsentOutdated", isConsentOutdated());
234
+
235
+ call.resolve(consentFormInfo);
236
+ }
237
+ }),
238
+ formError -> call.reject("Error when show consent form", formError.getMessage())
239
+ )
240
+ );
234
241
  } catch (Exception ex) {
235
242
  call.reject(ex.getLocalizedMessage(), ex);
236
243
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ququplay/admob",
3
- "version": "8.0.0",
3
+ "version": "8.0.2",
4
4
  "description": "A native plugin for AdMob",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",