docs: loadBanner is one-shot per banner object; emulator results; Android banner screenshots (Unity demo ads)

This commit is contained in:
CRTkafa 2026-10-10 05:08:28 +08:00
parent 4bd01013c2
commit 18a8d7c7a1
8 changed files with 21 additions and 9 deletions

View file

@ -951,7 +951,9 @@ loadBanner(options: BannerIdOptions) => Promise<void>
``` ```
Load the banner (`loadAd()` / `loadAdWithViewController:`). The outcome arrives as `bannerLoaded` or Load the banner (`loadAd()` / `loadAdWithViewController:`). The outcome arrives as `bannerLoaded` or
`bannerLoadFailed`; after the first load the SDK refreshes the banner on the dashboard interval. Web: no-op. `bannerLoadFailed`; after the first load the SDK refreshes the banner on the dashboard interval. The SDK accepts
one load per banner object: calling it again has no effect (Android logs "Banner load already called"), so to retry
right away after `bannerLoadFailed`, destroy the banner and create it again. Web: no-op.
| Param | Type | | Param | Type |
| ------------- | ----------------------------------------------------------- | | ------------- | ----------------------------------------------------------- |

2
dist/docs.json vendored
View file

@ -432,7 +432,7 @@
"text": "0.3.0" "text": "0.3.0"
} }
], ],
"docs": "Load the banner (`loadAd()` / `loadAdWithViewController:`). The outcome arrives as `bannerLoaded` or\n`bannerLoadFailed`; after the first load the SDK refreshes the banner on the dashboard interval. Web: no-op.", "docs": "Load the banner (`loadAd()` / `loadAdWithViewController:`). The outcome arrives as `bannerLoaded` or\n`bannerLoadFailed`; after the first load the SDK refreshes the banner on the dashboard interval. The SDK accepts\none load per banner object: calling it again has no effect (Android logs \"Banner load already called\"), so to retry\nright away after `bannerLoadFailed`, destroy the banner and create it again. Web: no-op.",
"complexTypes": [ "complexTypes": [
"BannerIdOptions" "BannerIdOptions"
], ],

View file

@ -1405,7 +1405,9 @@ export interface LevelPlayPlugin {
createBanner(options: CreateBannerOptions): Promise<BannerResult>; createBanner(options: CreateBannerOptions): Promise<BannerResult>;
/** /**
* Load the banner (`loadAd()` / `loadAdWithViewController:`). The outcome arrives as `bannerLoaded` or * Load the banner (`loadAd()` / `loadAdWithViewController:`). The outcome arrives as `bannerLoaded` or
* `bannerLoadFailed`; after the first load the SDK refreshes the banner on the dashboard interval. Web: no-op. * `bannerLoadFailed`; after the first load the SDK refreshes the banner on the dashboard interval. The SDK accepts
* one load per banner object: calling it again has no effect (Android logs "Banner load already called"), so to retry
* right away after `bannerLoadFailed`, destroy the banner and create it again. Web: no-op.
* *
* @since 0.3.0 * @since 0.3.0
*/ */

File diff suppressed because one or more lines are too long

View file

@ -487,6 +487,8 @@ Implementation details that the sections above leave open:
`resumeAutoRefresh()`. `resumeAutoRefresh()`.
- Banner and native listeners are per view / per ad object; callbacks from a replaced (rotation) or destroyed - Banner and native listeners are per view / per ad object; callbacks from a replaced (rotation) or destroyed
object are dropped. object are dropped.
- `loadAd()` on a banner view is one-shot in 9.6.1: a second call only logs "Banner load already called" and the SDK
retries on its own refresh interval. Immediate retries are destroy + create + load (documented on `loadBanner`).
- A native ad template consumes touches inside its bounds (taps between asset views do not reach the page). - A native ad template consumes touches inside its bounds (taps between asset views do not reach the page).
- Native template font files are read with `Typeface.createFromAsset(assets, "public/" + path)` and cached; a missing - Native template font files are read with `Typeface.createFromAsset(assets, "public/" + path)` and cached; a missing
file logs a warning (tag `LevelPlay`) and uses the system font. file logs a warning (tag `LevelPlay`) and uses the system font.
@ -501,12 +503,16 @@ Unity Ads 4.21 in the app):
banner reach the page; safe area with Capacitor's default insets handling and with `insetsHandling: 'disable'` banner reach the page; safe area with Capacitor's default insets handling and with `insetsHandling: 'disable'`
(edge to edge: top banner at y 52 = status bar, bottom banner ends 24 px above the WebView bottom = navigation (edge to edge: top banner at y 52 = status bar, bottom banner ends 24 px above the WebView bottom = navigation
bar; `respectSafeArea: false` gives y 0); rotation recreates a width-following adaptive banner (426 x 50 to bar; `respectSafeArea: false` gives y 0); rotation recreates a width-following adaptive banner (426 x 50 to
900 x 50, reloaded); rewarded load / show / reward / close; queued `impressionData` (banner, rewarded) flushed on 900 x 50, reloaded; landscape with a display cutout: both banners at x 52, width 900, inside the safe area); a tap
on a banner fires `bannerClicked` and opens the browser without reaching the page; rewarded load / show / reward / close; queued `impressionData` (banner, rewarded) flushed on
the first listener; native ad error paths (`UNSUPPORTED`, `INVALID_ARGUMENT`, `NOT_LOADED`, `NOT_FOUND`, the first listener; native ad error paths (`UNSUPPORTED`, `INVALID_ARGUMENT`, `NOT_LOADED`, `NOT_FOUND`,
`nativeAdLoadFailed` 508). `nativeAdLoadFailed` 508).
- Not seen with the public demo ids: a filled native ad (the demo app key has no native configuration: 508 "No Native - Not seen with the public demo ids: a filled native ad (the demo app key has no native configuration: 508 "No Native
Ad configurations found"), so `nativeAdLoaded` / `nativeAdImpression` / `nativeAdClicked` and the synthesised Ad configurations found"), so `nativeAdLoaded` / `nativeAdImpression` / `nativeAdClicked` and the synthesised
native `impressionData` are untested; the templates were rendered with sample assets through native `impressionData` are untested; the templates were rendered with sample assets through
`NativeAdTemplate.create` / `fill` instead. `adInfoChanged` never fired. An interstitial show (it loaded, then `NativeAdTemplate.create` / `fill` instead. `adInfoChanged` never fired. Interstitial: load and `displayed` seen, the close could not be
Unity Ads timed out on the overloaded emulator, later loads had no fill). `segmentName` stayed empty in `adInfo` driven through the ANR dialogs of the overloaded emulator. `segmentName` stayed empty in `adInfo`
(no segments on the demo dashboard). Banner click / expand / collapse / left-application events. (no segments on the demo dashboard). Banner expand / collapse / left-application events (Unity Ads test banners did not report them).
The emulator ran on an overloaded host (load average 30-40): system apps and the test app showed ANR dialogs
around SDK init and Unity full-screen ads; the overlay was idle at those times (no frames rendered while idle,
app CPU 2 %).

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

View file

@ -1503,7 +1503,9 @@ export interface LevelPlayPlugin {
/** /**
* Load the banner (`loadAd()` / `loadAdWithViewController:`). The outcome arrives as `bannerLoaded` or * Load the banner (`loadAd()` / `loadAdWithViewController:`). The outcome arrives as `bannerLoaded` or
* `bannerLoadFailed`; after the first load the SDK refreshes the banner on the dashboard interval. Web: no-op. * `bannerLoadFailed`; after the first load the SDK refreshes the banner on the dashboard interval. The SDK accepts
* one load per banner object: calling it again has no effect (Android logs "Banner load already called"), so to retry
* right away after `bannerLoadFailed`, destroy the banner and create it again. Web: no-op.
* *
* @since 0.3.0 * @since 0.3.0
*/ */