Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
4f9ea4f
rebase main
yarivgdidi Mar 19, 2026
ce515c3
Update src/web.ts
BETOXL Oct 13, 2025
2cb85f3
Update src/web.ts
BETOXL Oct 13, 2025
8a46c8a
Update demo/angular/src/app/app.component.ts
BETOXL Oct 13, 2025
79654eb
Update README.md
BETOXL Oct 13, 2025
540573c
Update README.md
BETOXL Oct 14, 2025
8c8d6f9
Update README.md
BETOXL Oct 14, 2025
544528f
Update AppOpenAdManager.java
BETOXL Oct 14, 2025
538cc30
Update AppOpenAdManager.java
BETOXL Oct 14, 2025
cd21f66
Update AppOpenAdManager.java
BETOXL Oct 14, 2025
88df068
Update AdMob.java
BETOXL Oct 14, 2025
cb76260
Update app.component.ts
BETOXL Oct 14, 2025
4a8071e
Update AppOpenAdManager.swift
BETOXL Oct 14, 2025
ff7f28f
Update app-open-definitions.interface.ts
BETOXL Oct 14, 2025
8be2121
Update web.ts
BETOXL Oct 14, 2025
8cbc810
Update README.md
BETOXL Oct 14, 2025
2377c8f
Refactor AppOpenAd Plugin initialization
BETOXL Oct 25, 2025
31ac6e5
Define AppOpenAdOptions interface and update loadAppOpen
BETOXL Oct 25, 2025
088fe10
Update AppOpenAdManager.java
BETOXL Oct 27, 2025
13b0992
Update android/src/main/java/com/getcapacitor/community/admob/appopen…
BETOXL Dec 4, 2025
0d64991
Update src/web.ts
BETOXL Dec 4, 2025
2a2fc5e
Update README.md
BETOXL Dec 4, 2025
b42a565
Update demo/angular/src/app/app.component.ts
BETOXL Dec 4, 2025
7564a9b
Update README.md
BETOXL Dec 4, 2025
8ec3d1b
Update README.md
BETOXL Dec 4, 2025
f925ea0
Update demo/angular/src/app/app.component.ts
BETOXL Dec 4, 2025
c1c19ce
Fix App Open ad lifecycle, event emission, and docs across Android/iOS
yarivgdidi Mar 19, 2026
9b08fdf
GoogleMobileAds fixes
yarivgdidi Mar 21, 2026
066e0ff
GoogleMobileAds fixes
yarivgdidi Mar 21, 2026
264d75e
GoogleMobileAds fixes
yarivgdidi Mar 21, 2026
e397821
GoogleMobileAds fixes
yarivgdidi Mar 21, 2026
6e84322
fix: address all PR review comments
yarivgdidi Apr 7, 2026
b8600b2
fix: address second round of Copilot review comments
yarivgdidi Apr 8, 2026
e3a0b3e
fix: use events enum and bubble errors per reviewer feedback
yarivgdidi Apr 8, 2026
53bbcd7
fix: address reviewer feedback - demo app and screenshots
yarivgdidi Apr 8, 2026
ff6eea6
fix: typed listener overloads, isAdLoaded check, remove unused factory
yarivgdidi Apr 8, 2026
0e4f79b
fix: error params in README examples, remove unused rootViewController
yarivgdidi Apr 9, 2026
03966b4
fix: consistency improvements from self-review
yarivgdidi Apr 9, 2026
182330b
fix: restore createAppOpenOptions factory method and tests
yarivgdidi Apr 9, 2026
a3fe7e3
refactor: convert AppOpenAdPlugin and AppOpenAdManager from Java to K…
yarivgdidi Apr 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
226 changes: 204 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ Made with [contributors-img](https://contrib.rocks).

### Screenshots

| | Banner | Interstitial | Reward |
| :---------- | :----------------------------------: | :----------------------------------------: | :----------------------------------: |
| **iOS** | ![](demo/screenshots/ios_banner.png) | ![](demo/screenshots/ios_interstitial.png) | ![](demo/screenshots/ios_reward.png) |
| **Android** | ![](demo/screenshots/md_banner.png) | ![](demo/screenshots/md_interstitial.png) | ![](demo/screenshots/md_reward.png) |
| | Banner | Interstitial | Reward | App Open |
| :---------- | :----------------------------------: | :----------------------------------------: | :----------------------------------: | :---------------------------------: |
| **iOS** | ![](demo/screenshots/ios_banner.png) | ![](demo/screenshots/ios_interstitial.png) | ![](demo/screenshots/ios_reward.png) | ![](demo/screenshots/ios_open.png) |
| **Android** | ![](demo/screenshots/md_banner.png) | ![](demo/screenshots/md_interstitial.png) | ![](demo/screenshots/md_reward.png) | ![](demo/screenshots/md_open.png) |

## Installation

Expand Down Expand Up @@ -188,7 +188,44 @@ 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, (error) => {
console.log('Failed to load App Open Ad', error);
});
AdMob.addListener(AppOpenAdPluginEvents.Opened, () => {
console.log('App Open Ad open');
});
AdMob.addListener(AppOpenAdPluginEvents.Closed, () => {
console.log('App Open Ad close');
});
AdMob.addListener(AppOpenAdPluginEvents.FailedToShow, (error) => {
console.log('Failed to show App Open Ad', error);
});

const options: AppOpenAdOptions = {
adId: 'YOUR_AD_UNIT_ID',
};
await AdMob.loadAppOpen(options);
const { value } = await AdMob.isAppOpenLoaded();
if (value) {
await AdMob.showAppOpen();
}
}
```
### Show Banner

```ts
Expand Down Expand Up @@ -334,6 +371,14 @@ AdMob.addListener(RewardAdPluginEvents.Rewarded, async () => {
* [`requestTrackingAuthorization()`](#requesttrackingauthorization)
* [`setApplicationMuted(...)`](#setapplicationmuted)
* [`setApplicationVolume(...)`](#setapplicationvolume)
* [`loadAppOpen(...)`](#loadappopen)
* [`showAppOpen()`](#showappopen)
* [`isAppOpenLoaded()`](#isappopenloaded)
* [`addListener(AppOpenAdPluginEvents.Loaded, ...)`](#addlistenerappopenadplugineventsloaded-)
* [`addListener(AppOpenAdPluginEvents.FailedToLoad, ...)`](#addlistenerappopenadplugineventsfailedtoload-)
* [`addListener(AppOpenAdPluginEvents.Opened, ...)`](#addlistenerappopenadplugineventsopened-)
* [`addListener(AppOpenAdPluginEvents.Closed, ...)`](#addlistenerappopenadplugineventsclosed-)
* [`addListener(AppOpenAdPluginEvents.FailedToShow, ...)`](#addlistenerappopenadplugineventsfailedtoshow-)
* [`showBanner(...)`](#showbanner)
* [`hideBanner()`](#hidebanner)
* [`resumeBanner()`](#resumebanner)
Expand Down Expand Up @@ -461,6 +506,125 @@ Report application volume to AdMob SDK
--------------------


### loadAppOpen(...)

```typescript
loadAppOpen(options: AppOpenAdOptions) => Promise<void>
```

Load an App Open ad

| Param | Type |
| ------------- | ------------------------------------------------------------- |
| **`options`** | <code><a href="#appopenadoptions">AppOpenAdOptions</a></code> |

--------------------


### showAppOpen()

```typescript
showAppOpen() => Promise<void>
```

Shows the App Open ad if loaded

--------------------


### isAppOpenLoaded()

```typescript
isAppOpenLoaded() => Promise<{ value: boolean; }>
```

Check if the App Open ad is loaded

**Returns:** <code>Promise&lt;{ value: boolean; }&gt;</code>

--------------------


### addListener(AppOpenAdPluginEvents.Loaded, ...)

```typescript
addListener(eventName: AppOpenAdPluginEvents.Loaded, listenerFunc: () => void) => Promise<PluginListenerHandle>
```

| Param | Type |
| ------------------ | ------------------------------------------------------------------------------ |
| **`eventName`** | <code><a href="#appopenadpluginevents">AppOpenAdPluginEvents.Loaded</a></code> |
| **`listenerFunc`** | <code>() =&gt; void</code> |

**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>

--------------------


### addListener(AppOpenAdPluginEvents.FailedToLoad, ...)

```typescript
addListener(eventName: AppOpenAdPluginEvents.FailedToLoad, listenerFunc: (error: AdMobError) => void) => Promise<PluginListenerHandle>
```

| Param | Type |
| ------------------ | ------------------------------------------------------------------------------------ |
| **`eventName`** | <code><a href="#appopenadpluginevents">AppOpenAdPluginEvents.FailedToLoad</a></code> |
| **`listenerFunc`** | <code>(error: <a href="#admoberror">AdMobError</a>) =&gt; void</code> |

**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>

--------------------


### addListener(AppOpenAdPluginEvents.Opened, ...)

```typescript
addListener(eventName: AppOpenAdPluginEvents.Opened, listenerFunc: () => void) => Promise<PluginListenerHandle>
```

| Param | Type |
| ------------------ | ------------------------------------------------------------------------------ |
| **`eventName`** | <code><a href="#appopenadpluginevents">AppOpenAdPluginEvents.Opened</a></code> |
| **`listenerFunc`** | <code>() =&gt; void</code> |

**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>

--------------------


### addListener(AppOpenAdPluginEvents.Closed, ...)

```typescript
addListener(eventName: AppOpenAdPluginEvents.Closed, listenerFunc: () => void) => Promise<PluginListenerHandle>
```

| Param | Type |
| ------------------ | ------------------------------------------------------------------------------ |
| **`eventName`** | <code><a href="#appopenadpluginevents">AppOpenAdPluginEvents.Closed</a></code> |
| **`listenerFunc`** | <code>() =&gt; void</code> |

**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>

--------------------


### addListener(AppOpenAdPluginEvents.FailedToShow, ...)

```typescript
addListener(eventName: AppOpenAdPluginEvents.FailedToShow, listenerFunc: (error: AdMobError) => void) => Promise<PluginListenerHandle>
```

| Param | Type |
| ------------------ | ------------------------------------------------------------------------------------ |
| **`eventName`** | <code><a href="#appopenadpluginevents">AppOpenAdPluginEvents.FailedToShow</a></code> |
| **`listenerFunc`** | <code>(error: <a href="#admoberror">AdMobError</a>) =&gt; void</code> |

**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>

--------------------


### showBanner(...)

```typescript
Expand Down Expand Up @@ -1102,6 +1266,31 @@ addListener(eventName: RewardInterstitialAdPluginEvents.Showed, listenerFunc: ()
| **`volume`** | <code>0 \| 1 \| 0.1 \| 0.2 \| 0.3 \| 0.4 \| 0.5 \| 0.6 \| 0.7 \| 0.8 \| 0.9</code> | If your app has its own volume controls (such as custom music or sound effect volumes), disclosing app volume to the Google Mobile Ads SDK allows video ads to respect app volume settings. enable set 0.0 - 1.0, any float allowed. | 4.1.1 |


#### AppOpenAdOptions

| Prop | Type |
| ---------- | ------------------- |
| **`adId`** | <code>string</code> |


#### PluginListenerHandle

| Prop | Type |
| ------------ | ----------------------------------------- |
| **`remove`** | <code>() =&gt; Promise&lt;void&gt;</code> |


#### AdMobError

For more information
https://developers.google.com/android/reference/com/google/android/gms/ads/AdError

| Prop | Type | Description |
| ------------- | ------------------- | -------------------------------------- |
| **`code`** | <code>number</code> | Gets the error's code. |
| **`message`** | <code>string</code> | Gets the message describing the error. |


#### BannerAdOptions

This interface extends <a href="#adoptions">AdOptions</a>
Expand All @@ -1117,13 +1306,6 @@ This interface extends <a href="#adoptions">AdOptions</a>
| **`immersiveMode`** | <code>boolean</code> | Sets a flag that controls if this interstitial or reward object will be displayed in immersive mode. Call this method before show. During show, if this flag is on and immersive mode is supported, SYSTEM_UI_FLAG_IMMERSIVE_STICKY &SYSTEM_UI_FLAG_HIDE_NAVIGATION will be turned on for interstitial or reward ad. | | 7.0.3 |


#### PluginListenerHandle

| Prop | Type |
| ------------ | ----------------------------------------- |
| **`remove`** | <code>() =&gt; Promise&lt;void&gt;</code> |


#### AdMobBannerSize

When notice listener of OnAdLoaded, you can get banner size.
Expand All @@ -1134,17 +1316,6 @@ When notice listener of OnAdLoaded, you can get banner size.
| **`height`** | <code>number</code> |


#### AdMobError

For more information
https://developers.google.com/android/reference/com/google/android/gms/ads/AdError

| Prop | Type | Description |
| ------------- | ------------------- | -------------------------------------- |
| **`code`** | <code>number</code> | Gets the error's code. |
| **`message`** | <code>string</code> | Gets the message describing the error. |


#### AdmobConsentInfo

| Prop | Type | Description | Since |
Expand Down Expand Up @@ -1256,6 +1427,17 @@ From T, pick a set of properties whose keys are in the union K
| **`MatureAudience`** | <code>'MatureAudience'</code> | Content suitable only for mature audiences. |


#### AppOpenAdPluginEvents

| Members | Value |
| ------------------ | ------------------------------------ |
| **`Loaded`** | <code>'appOpenAdLoaded'</code> |
| **`FailedToLoad`** | <code>'appOpenAdFailedToLoad'</code> |
| **`Opened`** | <code>'appOpenAdOpened'</code> |
| **`Closed`** | <code>'appOpenAdClosed'</code> |
| **`FailedToShow`** | <code>'appOpenAdFailedToShow'</code> |


#### BannerAdSize

| Members | Value | Description |
Expand Down
Loading
Loading