Closed rKatex closed 1 year ago
Hmm.. it seems the problem happens, when I do not confirm any vendor options.
Is this really the way to go? I guess many users will try to manage the options. And if they don't select some vendors (which they won't) they will see no ads?
I really don't know how an app could be monetized via ads then. Even more so when there is no way to check which vendors have been selected.
Hello, I found something similar, although in the form I accepted the options (without entering the custom options) the value I got was null, so even entering the options and checking all of them continued with the same thing.
After reading the documentation and trying different ways, I found the easiest solution.
Which is to use the selectPersonalisedAds variable that returns a boolean, in my case if the form is closed I set the value to false. I share the function I use:
const getUserConsent = async () => {
const consentInfo = await AdsConsent.requestInfoUpdate();
if (consentInfo.status === AdsConsentStatus.NOT_REQUIRED) {
guardarUserPersonalizedAds(true)
return
}
if (consentInfo.isConsentFormAvailable && consentInfo.status === AdsConsentStatus.REQUIRED) {
await AdsConsent.showForm();
return
}
if (consentInfo.status === AdsConsentStatus.OBTAINED) {
const {
selectPersonalisedAds,
storeAndAccessInformationOnDevice,
} = await AdsConsent.getUserChoices();
console.log('Personalized Ads ' + selectPersonalisedAds)
if (storeAndAccessInformationOnDevice === false) {
/**
* The user declined consent for purpose 1,
* the Google Mobile Ads SDK won't serve ads.
*/
guardarUserPersonalizedAds(false)
return
}
// save user setting maybe true or false
guardarUserPersonalizedAds(selectPersonalisedAds)
}
}
getUserConsent()
See some additional discussion @ https://github.com/invertase/react-native-google-mobile-ads/issues/274#issuecomment-1616329406
Re issues with potential issues on Apple submission.
I'm going to submit a build where if the user denies one or both of storage and basic ads permission (which as far as I can see, those are the conditions under which no ads at all are displayed), they are prompted to buy the full app or reconsider ad-choices.
Can't really see what else to do in this scenario. 🤷
Hello 👋, to help manage issues we automatically close stale issues.
This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?
This issue will be closed in 15 days if no further activity occurs.
Thank you for your contributions.
What happened?
I'm currently in the process of adding the admob consent screen to my app. The problem I'm facing is, that as soon as I choose "Manage option", even if i click on every consent checkbox, I won't see any ads. The ad inspector just tells me "No Fill".
If I click on "Consent" at the beginning or "Manage Options" and then "Accept all" I will see ads.
Platforms
Android, but have not tested behavior on iOS
React Native Info
Are your using Typescript?
package.json
app.json
ios/Podfile
No response
android/build.gradle
No response
android/app/build.gradle
No response
android/settings.gradle
No response
AndroidManifest.xml
No response