Skip to content

Commit

Permalink
fix(readme): reflect trackingAuthorizationStatus
Browse files Browse the repository at this point in the history
  • Loading branch information
rdlabo committed Oct 17, 2023
1 parent 1896034 commit aeb4e17
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,13 @@ export async function initialize(): Promise<void> {

await AdMob.requestTrackingAuthorization();
}

if (consentInfo.isConsentFormAvailable && consentInfo.status === AdmobConsentStatus.REQUIRED) {

const authorizationStatus = await AdMob.trackingAuthorizationStatus();
if (
authorizationStatus.status === 'authorized' &&
consentInfo.isConsentFormAvailable &&
consentInfo.status === AdmobConsentStatus.REQUIRED
) {
await AdMob.showConsentForm();
}
}
Expand Down

0 comments on commit aeb4e17

Please sign in to comment.