Skip to content

Commit 14d13d4

Browse files
Erik Czakodistante
authored andcommitted
added privacy options requirement status response to show consent form
1 parent be7ba2f commit 14d13d4

5 files changed

Lines changed: 9 additions & 9 deletions

File tree

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,7 @@ When notice listener of OnAdLoaded, you can get banner size.
11361136

11371137
#### AdMobError
11381138

1139-
For more information
1139+
For more information
11401140
https://developers.google.com/android/reference/com/google/android/gms/ads/AdError
11411141

11421142
| Prop | Type | Description |
@@ -1196,7 +1196,7 @@ https://developers.google.com/android/reference/com/google/android/gms/ads/AdErr
11961196

11971197
#### AdMobRewardItem
11981198

1199-
For more information
1199+
For more information
12001200
https://developers.google.com/admob/android/rewarded-video-adapters?hl=en
12011201

12021202
| Prop | Type | Description |
@@ -1240,9 +1240,7 @@ https://developers.google.com/admob/android/rewarded-video-adapters?hl=en
12401240

12411241
From T, pick a set of properties whose keys are in the union K
12421242

1243-
<code>{
1244-
[P in K]: T[P];
1245-
}</code>
1243+
<code>{ [P in K]: T[P]; }</code>
12461244

12471245

12481246
### Enums

android/src/main/java/com/getcapacitor/community/admob/consent/AdConsentExecutor.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ public void showConsentForm(final PluginCall call, BiConsumer<String, JSObject>
121121
JSObject consentFormInfo = new JSObject();
122122
consentFormInfo.put("status", getConsentStatusString(consentInformation.getConsentStatus()));
123123
consentFormInfo.put("canRequestAds", consentInformation.canRequestAds());
124+
consentFormInfo.put("privacyOptionsRequirementStatus", consentInformation.getPrivacyOptionsRequirementStatus().name());
124125
call.resolve(consentFormInfo);
125126
})
126127
);

ios/Sources/AdMobPlugin/Consent/ConsentExecutor.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ class ConsentExecutor: NSObject {
6060

6161
call.resolve([
6262
"status": self.getConsentStatusString(ConsentInformation.shared.consentStatus),
63-
"canRequestAds": ConsentInformation.shared.canRequestAds
63+
"canRequestAds": ConsentInformation.shared.canRequestAds,
64+
"privacyOptionsRequirementStatus": self.getPrivacyOptionsRequirementStatus(ConsentInformation.shared.privacyOptionsRequirementStatus)
6465
])
6566
} catch {
6667
call.reject("Request consent info failed")

src/consent/consent-definition.interface.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export interface AdmobConsentDefinitions {
1515
* Shows a google privacy options form (rendered from your GDPR message config).
1616
*
1717
* @group Consent
18-
* @since 6.2.0
18+
* @since 7.0.3
1919
*/
2020
showPrivacyOptionsForm(): Promise<void>;
2121

src/consent/consent-info.interface.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ export interface AdmobConsentInfo {
1616

1717
/**
1818
* If `true` an ad can be shown.
19-
* @since 6.2.0
19+
* @since 7.0.3
2020
*/
2121
canRequestAds: boolean;
2222

2323
/**
2424
* Privacy options requirement status of the user.
25-
* @since 6.2.0
25+
* @since 7.0.3
2626
*/
2727
privacyOptionsRequirementStatus: PrivacyOptionsRequirementStatus;
2828
}

0 commit comments

Comments
 (0)