-
Notifications
You must be signed in to change notification settings - Fork 86
feat: support for App Open Ad en Android e iOS #386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 17 commits
e3c2d24
ded6452
d1bbba1
9494d2e
e65274f
8d6d787
a1d73cf
2549a0a
8f33ad7
4aac09b
23ab476
eee34de
5359b16
3548d4f
a00d292
f81c2d6
a0eae03
b82471b
f742340
a885fad
3b9d047
5b3f914
ed1c654
5fcb155
88caf87
ef80ce7
9d8c31b
7c8c244
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,3 +1,4 @@ | ||||||||||
|
|
||||||||||
| <p align="center"><br><img src="https://user-images.githubusercontent.com/236501/85893648-1c92e880-b7a8-11ea-926d-95355b8175c7.png" width="128" height="128" /></p> | ||||||||||
| <h3 align="center">AdMob</h3> | ||||||||||
| <p align="center"><strong><code>@capacitor-community/admob</code></strong></p> | ||||||||||
|
|
@@ -188,7 +189,46 @@ const consentInfo = await AdMob.requestConsentInfo({ | |||||||||
| 2. AdMob.requestConsentInfo | ||||||||||
| 3. AdMob.showConsentForm (If consent form required ) | ||||||||||
| 3/ AdMob.showBanner | ||||||||||
|
|
||||||||||
| ### Show App Open Ad | ||||||||||
|
|
||||||||||
| ```ts | ||||||||||
| import { | ||||||||||
| AdMob, | ||||||||||
| AppOpenAdPluginEvents, | ||||||||||
| AppOpenAdOptions, | ||||||||||
| } from '@capacitor-community/admob'; | ||||||||||
|
|
||||||||||
| export async function showAppOpenAd(): Promise<void> { | ||||||||||
| // listen to events | ||||||||||
| AdMob.addListener(AppOpenAdPluginEvents.Loaded, () => { | ||||||||||
| console.log('App Open Ad loaded'); | ||||||||||
| }); | ||||||||||
| AdMob.addListener(AppOpenAdPluginEvents.FailedToLoad, () => { | ||||||||||
| console.log('Failed to load App Open Ad'); | ||||||||||
| }); | ||||||||||
| AdMob.addListener(AppOpenAdPluginEvents.Opened, () => { | ||||||||||
| console.log('App Open Ad open'); | ||||||||||
| }); | ||||||||||
| AdMob.addListener(AppOpenAdPluginEvents.Closed, () => { | ||||||||||
| console.log('App Open Ad close'); | ||||||||||
| }); | ||||||||||
| AdMob.addListener(AppOpenAdPluginEvents.FailedToShow, () => { | ||||||||||
| console.log('Failed to load App Open Ad'); | ||||||||||
| }); | ||||||||||
|
|
||||||||||
| const options: AppOpenAdOptions = { | ||||||||||
| adUnitId: 'TU_AD_UNIT_ID', | ||||||||||
| showOnColdStart: true, // Opcional | ||||||||||
| showOnForeground: true, // Opcional | ||||||||||
|
Comment on lines
+222
to
+223
|
||||||||||
| showOnColdStart: true, // Opcional | |
| showOnForeground: true, // Opcional | |
| showOnColdStart: true, // Optional | |
| showOnForeground: true, // Optional |
Copilot
AI
Dec 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Documentation for the App Open Ad methods is written in Spanish ("Carga un anuncio App Open", "Muestra el anuncio App Open si está cargado", "Verifica si el anuncio App Open está cargado", "Agrega listeners para eventos de App Open").
The rest of the README is in English, so these should be translated for consistency. For example:
- Line 1120: "Load an App Open ad"
- Line 1135: "Shows the App Open ad if loaded"
- Line 1146: "Check if the App Open ad is loaded"
- Line 1159: "Add listeners for App Open events"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment text is in Spanish instead of English. Should be: "// Optional"