From 55d5d39ad9541650b1d9281f026f4e81f75441c3 Mon Sep 17 00:00:00 2001 From: Robert Jamison <65142411+robertjamison@users.noreply.github.com> Date: Fri, 15 Nov 2024 22:54:49 -0500 Subject: [PATCH] V0.2.0 (#40) * init * Basic ads (#39) * init * Reduced target SDK value for Logging. * Fixed Gradle misconfig * Changed Compose version to latest. * * Added Annotations for GoogleMobileAds dependencies and ExperimentalBasicAds * Created a transitive dependence on MobileAds * Updated Composables and compose dependency * Changed order of iOS logging * Basic-Ads is WORKING on iOS!!!! * Created AdLoader.kt and updated relevant dependencies * Fixed Gradle misconfig * Changed Compose version to latest. * * Added Annotations for GoogleMobileAds dependencies and ExperimentalBasicAds * Created a transitive dependence on MobileAds * Updated Composables and compose dependency * Changed order of iOS logging * Basic-Ads is WORKING on iOS!!!! * Created AdLoader.kt and updated relevant dependencies * init * Fixed InterstitialAd * Added RewardedInterstitialAds * Added RewardedAds * Added RewardedInterstitialAd and linked all to composables. * Added iosMain implementation of AdLoader * Finished iosMain Composables.kt. * Built and removed "super" since it is not possible in obj-c * Added super simple way to return AdUnitId. * Fixed a small error related to expect/actual * Updated Dokka documentation * Added CompileOnly for AdMob Dependency Removed all traces of Javascript implementation * Verified build using publishToMavenLocal * * Added Default AdUnitIds for each ad type * Fixed Dokka errors in Composables.kt * Updated README.MD * * Updated documentation for Basic-Ads * * Updated version to v0.2.0 * * Updated README.md * * Added AudioByte and AudioByteBuilder * * Updated README.md for AudioByte * * Cleaned up final TODOs * * Added Medium Basic Ads walkthrough * * Added Medium Basic Ads walkthrough * Update README.md --- README.md | 29 +- basic-ads/README.md | 113 ++ basic-ads/build.gradle.kts | 102 ++ .../kotlin/app/lexilabs/basic/ads/AdLoader.kt | 246 +++ .../kotlin/app/lexilabs/basic/ads/AdSize.kt | 22 + .../kotlin/app/lexilabs/basic/ads/AdUnitId.kt | 11 + .../kotlin/app/lexilabs/basic/ads/BasicAds.kt | 50 + .../app/lexilabs/basic/ads/Composables.kt | 67 + .../app/lexilabs/basic/ads/Converters.kt | 37 + .../kotlin/app/lexilabs/basic/ads/AdError.kt | 7 + .../kotlin/app/lexilabs/basic/ads/AdLoader.kt | 103 ++ .../kotlin/app/lexilabs/basic/ads/AdSize.kt | 45 + .../kotlin/app/lexilabs/basic/ads/AdUnitId.kt | 20 + .../kotlin/app/lexilabs/basic/ads/BasicAds.kt | 88 + .../app/lexilabs/basic/ads/Composables.kt | 58 + .../basic/ads/DependsOnGoogleMobileAds.kt | 21 + .../basic/ads/ExperimentalBasicAds.kt | 11 + .../basic/ads/RequestConfiguration.kt | 47 + .../kotlin/app/lexilabs/basic/ads/AdError.kt | 3 + .../kotlin/app/lexilabs/basic/ads/AdLoader.kt | 261 +++ .../kotlin/app/lexilabs/basic/ads/AdSize.kt | 73 + .../kotlin/app/lexilabs/basic/ads/AdUnitId.kt | 12 + .../kotlin/app/lexilabs/basic/ads/BasicAds.kt | 91 + .../app/lexilabs/basic/ads/Composables.kt | 73 + .../app/lexilabs/basic/logging/Log.apple.kt | 12 +- basic-sound/README.md | 35 +- .../lexilabs/basic/sound/AudioByte.android.kt | 39 + .../lexilabs/basic/sound/AudioByte.apple.kt | 48 + .../kotlin/app/lexilabs/basic/sound/Audio.kt | 1 - .../app/lexilabs/basic/sound/AudioByte.kt | 51 + .../lexilabs/basic/sound/AudioByteBuilder.kt | 7 + .../app/lexilabs/basic/sound/AudioByte.js.kt | 27 + .../lexilabs/basic/sound/AudioByte.wasmJs.kt | 27 + build.gradle.kts | 3 +- .../-ad-error/-ad-error.html | 82 + .../-ad-error/index.html | 148 ++ .../-ad-loader/-ad-loader.html | 84 + .../-ad-loader/index.html | 233 +++ .../-ad-loader/load-interstitial-ad.html | 84 + .../-ad-loader/load-rewarded-ad.html | 84 + .../load-rewarded-interstitial-ad.html | 84 + .../-ad-loader/request-ad.html | 84 + .../-ad-loader/show-interstitial-ad.html | 84 + .../-ad-loader/show-rewarded-ad.html | 84 + .../show-rewarded-interstitial-ad.html | 84 + .../-ad-request/index.html | 88 + .../-ad-size/-ad-size.html | 84 + .../-companion/-a-u-t-o_-h-e-i-g-h-t.html | 84 + .../-ad-size/-companion/-b-a-n-n-e-r.html | 84 + .../-ad-size/-companion/-f-l-u-i-d.html | 84 + .../-companion/-f-u-l-l_-b-a-n-n-e-r.html | 84 + .../-companion/-f-u-l-l_-w-i-d-t-h.html | 84 + .../-ad-size/-companion/-i-n-v-a-l-i-d.html | 84 + .../-companion/-l-a-r-g-e_-b-a-n-n-e-r.html | 84 + .../-companion/-l-e-a-d-e-r-b-o-a-r-d.html | 84 + .../-m-e-d-i-u-m_-r-e-c-t-a-n-g-l-e.html | 84 + .../-ad-size/-companion/-s-e-a-r-c-h.html | 84 + .../-w-i-d-e_-s-k-y-s-c-r-a-p-e-r.html | 84 + .../-ad-size/-companion/index.html | 280 +++ .../-ad-size/height.html | 84 + .../-ad-size/index.html | 224 +++ .../-ad-size/to-ios.html | 82 + .../-ad-size/width.html | 84 + .../-b-a-n-n-e-r_-d-e-f-a-u-l-t.html | 84 + ...-n-t-e-r-s-t-i-t-i-a-l_-d-e-f-a-u-l-t.html | 84 + .../-r-e-w-a-r-d-e-d_-d-e-f-a-u-l-t.html | 84 + ...-n-t-e-r-s-t-i-t-i-a-l_-d-e-f-a-u-l-t.html | 84 + .../-ad-unit-id/auto-select.html | 84 + .../-ad-unit-id/index.html | 182 ++ .../-ad-view/index.html | 86 + .../app.lexilabs.basic.ads/-banner-ad.html | 84 + .../-basic-ads/configuration.html | 84 + ...able-mediation-adapter-initialization.html | 84 + .../-basic-ads/error-domain.html | 84 + .../-basic-ads/index.html | 250 +++ .../-basic-ads/initialize.html | 84 + .../-basic-ads/initialized.html | 84 + .../-basic-ads/open-debug-menu.html | 84 + .../-basic-ads/set-app-muted.html | 84 + .../-basic-ads/set-app-volume.html | 84 + .../-basic-ads/version.html | 84 + .../-depends-on-google-mobile-ads/index.html | 84 + .../-experimental-basic-ads/index.html | 84 + .../-interstitial-ad.html | 84 + ...x_-a-d_-c-o-n-t-e-n-t_-r-a-t-i-n-g_-g.html | 80 + ...-a-d_-c-o-n-t-e-n-t_-r-a-t-i-n-g_-m-a.html | 80 + ...-a-d_-c-o-n-t-e-n-t_-r-a-t-i-n-g_-p-g.html | 80 + ...x_-a-d_-c-o-n-t-e-n-t_-r-a-t-i-n-g_-t.html | 80 + ...t_-r-a-t-i-n-g_-u-n-s-p-e-c-i-f-i-e-d.html | 80 + ...c-t-e-d_-t-r-e-a-t-m-e-n-t_-f-a-l-s-e.html | 80 + ...e-c-t-e-d_-t-r-e-a-t-m-e-n-t_-t-r-u-e.html | 80 + ...-e-a-t-m-e-n-t_-u-n-s-p-e-c-i-f-i-e-d.html | 80 + ...-a-g-e_-o-f_-c-o-n-s-e-n-t_-f-a-l-s-e.html | 80 + ...r_-a-g-e_-o-f_-c-o-n-s-e-n-t_-t-r-u-e.html | 80 + ...-c-o-n-s-e-n-t_-u-n-s-p-e-c-i-f-i-e-d.html | 80 + .../-companion/index.html | 254 +++ .../-companion/from-int.html | 80 + .../-companion/index.html | 104 ++ .../-d-e-f-a-u-l-t/index.html | 119 ++ .../-d-i-s-a-b-l-e-d/index.html | 119 ++ .../-e-n-a-b-l-e-d/index.html | 119 ++ .../entries.html | 80 + .../index.html | 254 +++ .../value-of.html | 80 + .../values.html | 80 + .../-request-configuration.html | 80 + .../-request-configuration/index.html | 239 +++ .../max-ad-content-rating.html | 80 + ...blisher-privacy-personalization-state.html | 80 + .../tag-for-child-directed-treatment.html | 80 + .../tag-for-under-age-of-consent.html | 80 + .../test-device-ids.html | 80 + .../app.lexilabs.basic.ads/-rewarded-ad.html | 84 + .../-rewarded-interstitial-ad.html | 84 + .../app.lexilabs.basic.ads/index.html | 377 ++++ .../app.lexilabs.basic.ads/to-android.html | 82 + .../to-c-g-rect-c-value.html | 82 + .../app.lexilabs.basic.ads/to-common.html | 83 + docs/basic-ads/basic-ads/package-list | 94 + docs/basic-ads/images/anchor-copy-button.svg | 8 + docs/basic-ads/images/arrow_down.svg | 7 + docs/basic-ads/images/burger.svg | 9 + docs/basic-ads/images/copy-icon.svg | 7 + .../basic-ads/images/copy-successful-icon.svg | 7 + docs/basic-ads/images/footer-go-to-link.svg | 7 + docs/basic-ads/images/go-to-top-icon.svg | 8 + docs/basic-ads/images/homepage.svg | 3 + docs/basic-ads/images/logo-icon.svg | 14 + .../nav-icons/abstract-class-kotlin.svg | 26 + .../images/nav-icons/abstract-class.svg | 20 + .../images/nav-icons/annotation-kotlin.svg | 13 + .../basic-ads/images/nav-icons/annotation.svg | 7 + .../images/nav-icons/class-kotlin.svg | 13 + docs/basic-ads/images/nav-icons/class.svg | 7 + .../images/nav-icons/enum-kotlin.svg | 13 + docs/basic-ads/images/nav-icons/enum.svg | 7 + .../images/nav-icons/exception-class.svg | 7 + .../images/nav-icons/field-value.svg | 10 + .../images/nav-icons/field-variable.svg | 10 + docs/basic-ads/images/nav-icons/function.svg | 7 + .../images/nav-icons/interface-kotlin.svg | 13 + docs/basic-ads/images/nav-icons/interface.svg | 7 + docs/basic-ads/images/nav-icons/object.svg | 13 + .../images/nav-icons/typealias-kotlin.svg | 13 + docs/basic-ads/images/theme-toggle.svg | 7 + docs/basic-ads/index.html | 103 ++ docs/basic-ads/navigation.html | 79 + docs/basic-ads/scripts/clipboard.js | 56 + docs/basic-ads/scripts/main.js | 44 + docs/basic-ads/scripts/navigation-loader.js | 95 ++ docs/basic-ads/scripts/pages.json | 1 + .../scripts/platform-content-handler.js | 400 +++++ docs/basic-ads/scripts/prism.js | 22 + .../scripts/sourceset_dependencies.js | 1 + .../symbol-parameters-wrapper_deferred.js | 64 + docs/basic-ads/styles/font-jb-sans-auto.css | 36 + docs/basic-ads/styles/logo-styles.css | 9 + docs/basic-ads/styles/main.css | 124 ++ docs/basic-ads/styles/prism.css | 217 +++ docs/basic-ads/styles/style.css | 1509 +++++++++++++++++ .../-basic-image-place-holder.html | 2 +- .../-basic-image.html | 2 +- .../-basic-path/-basic-path.html | 2 +- .../-basic-path/index.html | 2 +- .../-basic-path/to-string.html | 2 +- .../-basic-url/-basic-url.html | 2 +- .../-basic-url/index.html | 2 +- .../-basic-url/to-string.html | 2 +- .../-experimental-basic-images/index.html | 2 +- .../-image-client/index.html | 2 +- .../-image-client/invoke.html | 2 +- .../-image-loader/index.html | 2 +- .../-image-loader/load.html | 2 +- .../-image-state/-e-r-r-o-r/-e-r-r-o-r.html | 2 +- .../-image-state/-e-r-r-o-r/index.html | 2 +- .../-image-state/-e-r-r-o-r/message.html | 2 +- .../-image-state/-l-o-a-d-i-n-g/index.html | 2 +- .../-image-state/-n-o-n-e/index.html | 2 +- .../-image-state/-s-h-o-w-i-n-g/index.html | 2 +- .../-image-state/index.html | 2 +- .../app.lexilabs.basic.images/index.html | 2 +- docs/basic-images/index.html | 2 +- .../app.lexilabs.basic.logging/-log/d.html | 2 +- .../app.lexilabs.basic.logging/-log/e.html | 2 +- .../app.lexilabs.basic.logging/-log/i.html | 2 +- .../-log/index.html | 2 +- .../app.lexilabs.basic.logging/-log/v.html | 2 +- .../app.lexilabs.basic.logging/-log/w.html | 2 +- .../app.lexilabs.basic.logging/-log/wtf.html | 2 +- .../app.lexilabs.basic.logging/-logger/d.html | 2 +- .../app.lexilabs.basic.logging/-logger/e.html | 2 +- .../app.lexilabs.basic.logging/-logger/i.html | 2 +- .../-logger/index.html | 2 +- .../app.lexilabs.basic.logging/-logger/v.html | 2 +- .../app.lexilabs.basic.logging/-logger/w.html | 2 +- .../-logger/wtf.html | 2 +- .../app.lexilabs.basic.logging/index.html | 2 +- docs/basic-logging/index.html | 2 +- .../-audio-builder/audio-state.html | 2 +- .../-audio-builder/index.html | 2 +- .../-audio-builder/load.html | 2 +- .../-audio-builder/pause.html | 2 +- .../-audio-builder/play.html | 2 +- .../-audio-builder/release.html | 2 +- .../-audio-builder/stop.html | 2 +- .../-audio-byte-builder/index.html | 134 ++ .../-audio-byte-builder/load.html | 80 + .../-audio-byte-builder/play.html | 80 + .../-audio-byte-builder/release.html | 80 + .../-audio-byte/-audio-byte.html | 84 + .../-audio-byte/index.html | 165 ++ .../-audio-byte/load.html | 84 + .../-audio-byte/play.html | 84 + .../-audio-byte/release.html | 84 + .../-audio-state/-e-r-r-o-r/-e-r-r-o-r.html | 2 +- .../-audio-state/-e-r-r-o-r/index.html | 2 +- .../-audio-state/-e-r-r-o-r/message.html | 2 +- .../-audio-state/-l-o-a-d-i-n-g/index.html | 2 +- .../-audio-state/-n-o-n-e/index.html | 2 +- .../-audio-state/-p-a-u-s-e-d/index.html | 2 +- .../-audio-state/-p-l-a-y-i-n-g/index.html | 2 +- .../-audio-state/-r-e-a-d-y/index.html | 2 +- .../-audio-state/index.html | 2 +- .../-audio/-audio.html | 2 +- .../-audio/audio-state.html | 2 +- .../-audio/auto-play.html | 2 +- .../-audio/index.html | 2 +- .../app.lexilabs.basic.sound/-audio/load.html | 2 +- .../-audio/pause.html | 2 +- .../app.lexilabs.basic.sound/-audio/play.html | 2 +- .../-audio/release.html | 2 +- .../-audio/resource.html | 2 +- .../app.lexilabs.basic.sound/-audio/stop.html | 2 +- .../-experimental-basic-sound/index.html | 2 +- .../app.lexilabs.basic.sound/index.html | 34 +- docs/basic-sound/basic-sound/package-list | 9 + docs/basic-sound/index.html | 2 +- docs/basic-sound/navigation.html | 24 +- docs/basic-sound/scripts/pages.json | 2 +- docs/index.html | 5 +- gradle.properties | 2 + gradle/libs.versions.toml | 15 +- settings.gradle.kts | 1 + 243 files changed, 14645 insertions(+), 106 deletions(-) create mode 100644 basic-ads/README.md create mode 100644 basic-ads/build.gradle.kts create mode 100644 basic-ads/src/androidMain/kotlin/app/lexilabs/basic/ads/AdLoader.kt create mode 100644 basic-ads/src/androidMain/kotlin/app/lexilabs/basic/ads/AdSize.kt create mode 100644 basic-ads/src/androidMain/kotlin/app/lexilabs/basic/ads/AdUnitId.kt create mode 100644 basic-ads/src/androidMain/kotlin/app/lexilabs/basic/ads/BasicAds.kt create mode 100644 basic-ads/src/androidMain/kotlin/app/lexilabs/basic/ads/Composables.kt create mode 100644 basic-ads/src/androidMain/kotlin/app/lexilabs/basic/ads/Converters.kt create mode 100644 basic-ads/src/commonMain/kotlin/app/lexilabs/basic/ads/AdError.kt create mode 100644 basic-ads/src/commonMain/kotlin/app/lexilabs/basic/ads/AdLoader.kt create mode 100644 basic-ads/src/commonMain/kotlin/app/lexilabs/basic/ads/AdSize.kt create mode 100644 basic-ads/src/commonMain/kotlin/app/lexilabs/basic/ads/AdUnitId.kt create mode 100644 basic-ads/src/commonMain/kotlin/app/lexilabs/basic/ads/BasicAds.kt create mode 100644 basic-ads/src/commonMain/kotlin/app/lexilabs/basic/ads/Composables.kt create mode 100644 basic-ads/src/commonMain/kotlin/app/lexilabs/basic/ads/DependsOnGoogleMobileAds.kt create mode 100644 basic-ads/src/commonMain/kotlin/app/lexilabs/basic/ads/ExperimentalBasicAds.kt create mode 100644 basic-ads/src/commonMain/kotlin/app/lexilabs/basic/ads/RequestConfiguration.kt create mode 100644 basic-ads/src/iosMain/kotlin/app/lexilabs/basic/ads/AdError.kt create mode 100644 basic-ads/src/iosMain/kotlin/app/lexilabs/basic/ads/AdLoader.kt create mode 100644 basic-ads/src/iosMain/kotlin/app/lexilabs/basic/ads/AdSize.kt create mode 100644 basic-ads/src/iosMain/kotlin/app/lexilabs/basic/ads/AdUnitId.kt create mode 100644 basic-ads/src/iosMain/kotlin/app/lexilabs/basic/ads/BasicAds.kt create mode 100644 basic-ads/src/iosMain/kotlin/app/lexilabs/basic/ads/Composables.kt create mode 100644 basic-sound/src/androidMain/kotlin/app/lexilabs/basic/sound/AudioByte.android.kt create mode 100644 basic-sound/src/appleMain/kotlin/app/lexilabs/basic/sound/AudioByte.apple.kt create mode 100644 basic-sound/src/commonMain/kotlin/app/lexilabs/basic/sound/AudioByte.kt create mode 100644 basic-sound/src/commonMain/kotlin/app/lexilabs/basic/sound/AudioByteBuilder.kt create mode 100644 basic-sound/src/jsMain/kotlin/app/lexilabs/basic/sound/AudioByte.js.kt create mode 100644 basic-sound/src/wasmJsMain/kotlin/app/lexilabs/basic/sound/AudioByte.wasmJs.kt create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-error/-ad-error.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-error/index.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-loader/-ad-loader.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-loader/index.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-loader/load-interstitial-ad.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-loader/load-rewarded-ad.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-loader/load-rewarded-interstitial-ad.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-loader/request-ad.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-loader/show-interstitial-ad.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-loader/show-rewarded-ad.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-loader/show-rewarded-interstitial-ad.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-request/index.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-ad-size.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-a-u-t-o_-h-e-i-g-h-t.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-b-a-n-n-e-r.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-f-l-u-i-d.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-f-u-l-l_-b-a-n-n-e-r.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-f-u-l-l_-w-i-d-t-h.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-i-n-v-a-l-i-d.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-l-a-r-g-e_-b-a-n-n-e-r.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-l-e-a-d-e-r-b-o-a-r-d.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-m-e-d-i-u-m_-r-e-c-t-a-n-g-l-e.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-s-e-a-r-c-h.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-w-i-d-e_-s-k-y-s-c-r-a-p-e-r.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/index.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/height.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/index.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/to-ios.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/width.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-unit-id/-b-a-n-n-e-r_-d-e-f-a-u-l-t.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-unit-id/-i-n-t-e-r-s-t-i-t-i-a-l_-d-e-f-a-u-l-t.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-unit-id/-r-e-w-a-r-d-e-d_-d-e-f-a-u-l-t.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-unit-id/-r-e-w-a-r-d-e-d_-i-n-t-e-r-s-t-i-t-i-a-l_-d-e-f-a-u-l-t.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-unit-id/auto-select.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-unit-id/index.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-view/index.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-banner-ad.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-basic-ads/configuration.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-basic-ads/disable-mediation-adapter-initialization.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-basic-ads/error-domain.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-basic-ads/index.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-basic-ads/initialize.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-basic-ads/initialized.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-basic-ads/open-debug-menu.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-basic-ads/set-app-muted.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-basic-ads/set-app-volume.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-basic-ads/version.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-depends-on-google-mobile-ads/index.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-experimental-basic-ads/index.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-interstitial-ad.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-m-a-x_-a-d_-c-o-n-t-e-n-t_-r-a-t-i-n-g_-g.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-m-a-x_-a-d_-c-o-n-t-e-n-t_-r-a-t-i-n-g_-m-a.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-m-a-x_-a-d_-c-o-n-t-e-n-t_-r-a-t-i-n-g_-p-g.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-m-a-x_-a-d_-c-o-n-t-e-n-t_-r-a-t-i-n-g_-t.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-m-a-x_-a-d_-c-o-n-t-e-n-t_-r-a-t-i-n-g_-u-n-s-p-e-c-i-f-i-e-d.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-t-a-g_-f-o-r_-c-h-i-l-d_-d-i-r-e-c-t-e-d_-t-r-e-a-t-m-e-n-t_-f-a-l-s-e.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-t-a-g_-f-o-r_-c-h-i-l-d_-d-i-r-e-c-t-e-d_-t-r-e-a-t-m-e-n-t_-t-r-u-e.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-t-a-g_-f-o-r_-c-h-i-l-d_-d-i-r-e-c-t-e-d_-t-r-e-a-t-m-e-n-t_-u-n-s-p-e-c-i-f-i-e-d.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-t-a-g_-f-o-r_-u-n-d-e-r_-a-g-e_-o-f_-c-o-n-s-e-n-t_-f-a-l-s-e.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-t-a-g_-f-o-r_-u-n-d-e-r_-a-g-e_-o-f_-c-o-n-s-e-n-t_-t-r-u-e.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-t-a-g_-f-o-r_-u-n-d-e-r_-a-g-e_-o-f_-c-o-n-s-e-n-t_-u-n-s-p-e-c-i-f-i-e-d.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/index.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-publisher-privacy-personalization-state/-companion/from-int.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-publisher-privacy-personalization-state/-companion/index.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-publisher-privacy-personalization-state/-d-e-f-a-u-l-t/index.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-publisher-privacy-personalization-state/-d-i-s-a-b-l-e-d/index.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-publisher-privacy-personalization-state/-e-n-a-b-l-e-d/index.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-publisher-privacy-personalization-state/entries.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-publisher-privacy-personalization-state/index.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-publisher-privacy-personalization-state/value-of.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-publisher-privacy-personalization-state/values.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-request-configuration.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/index.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/max-ad-content-rating.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/publisher-privacy-personalization-state.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/tag-for-child-directed-treatment.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/tag-for-under-age-of-consent.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/test-device-ids.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-rewarded-ad.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-rewarded-interstitial-ad.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/index.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/to-android.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/to-c-g-rect-c-value.html create mode 100644 docs/basic-ads/basic-ads/app.lexilabs.basic.ads/to-common.html create mode 100644 docs/basic-ads/basic-ads/package-list create mode 100644 docs/basic-ads/images/anchor-copy-button.svg create mode 100644 docs/basic-ads/images/arrow_down.svg create mode 100644 docs/basic-ads/images/burger.svg create mode 100644 docs/basic-ads/images/copy-icon.svg create mode 100644 docs/basic-ads/images/copy-successful-icon.svg create mode 100644 docs/basic-ads/images/footer-go-to-link.svg create mode 100644 docs/basic-ads/images/go-to-top-icon.svg create mode 100644 docs/basic-ads/images/homepage.svg create mode 100644 docs/basic-ads/images/logo-icon.svg create mode 100644 docs/basic-ads/images/nav-icons/abstract-class-kotlin.svg create mode 100644 docs/basic-ads/images/nav-icons/abstract-class.svg create mode 100644 docs/basic-ads/images/nav-icons/annotation-kotlin.svg create mode 100644 docs/basic-ads/images/nav-icons/annotation.svg create mode 100644 docs/basic-ads/images/nav-icons/class-kotlin.svg create mode 100644 docs/basic-ads/images/nav-icons/class.svg create mode 100644 docs/basic-ads/images/nav-icons/enum-kotlin.svg create mode 100644 docs/basic-ads/images/nav-icons/enum.svg create mode 100644 docs/basic-ads/images/nav-icons/exception-class.svg create mode 100644 docs/basic-ads/images/nav-icons/field-value.svg create mode 100644 docs/basic-ads/images/nav-icons/field-variable.svg create mode 100644 docs/basic-ads/images/nav-icons/function.svg create mode 100644 docs/basic-ads/images/nav-icons/interface-kotlin.svg create mode 100644 docs/basic-ads/images/nav-icons/interface.svg create mode 100644 docs/basic-ads/images/nav-icons/object.svg create mode 100644 docs/basic-ads/images/nav-icons/typealias-kotlin.svg create mode 100644 docs/basic-ads/images/theme-toggle.svg create mode 100644 docs/basic-ads/index.html create mode 100644 docs/basic-ads/navigation.html create mode 100644 docs/basic-ads/scripts/clipboard.js create mode 100644 docs/basic-ads/scripts/main.js create mode 100644 docs/basic-ads/scripts/navigation-loader.js create mode 100644 docs/basic-ads/scripts/pages.json create mode 100644 docs/basic-ads/scripts/platform-content-handler.js create mode 100644 docs/basic-ads/scripts/prism.js create mode 100644 docs/basic-ads/scripts/sourceset_dependencies.js create mode 100644 docs/basic-ads/scripts/symbol-parameters-wrapper_deferred.js create mode 100644 docs/basic-ads/styles/font-jb-sans-auto.css create mode 100644 docs/basic-ads/styles/logo-styles.css create mode 100644 docs/basic-ads/styles/main.css create mode 100644 docs/basic-ads/styles/prism.css create mode 100644 docs/basic-ads/styles/style.css create mode 100644 docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-byte-builder/index.html create mode 100644 docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-byte-builder/load.html create mode 100644 docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-byte-builder/play.html create mode 100644 docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-byte-builder/release.html create mode 100644 docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-byte/-audio-byte.html create mode 100644 docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-byte/index.html create mode 100644 docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-byte/load.html create mode 100644 docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-byte/play.html create mode 100644 docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-byte/release.html diff --git a/README.md b/README.md index a7493f7..105532d 100644 --- a/README.md +++ b/README.md @@ -7,24 +7,25 @@ A Kotlin Multiplatform library to rapidly add basic features like pictures, logging, and audio to any project in a small and fast way. -| Platforms | Basic-Images | Basic-Logging | Basic-Sound | -|:--------------|:------------------:|:--------------------:|:------------------:| -| Android | :white_check_mark: | :white_check_mark: | :white_check_mark: | -| iOS | :white_check_mark: | :white_check_mark: | :white_check_mark: | -| macOS | :white_check_mark: | :white_check_mark: | :white_check_mark: | -| watchOS | | :white_check_mark: | :white_check_mark: | -| tvOS | | :white_check_mark: | :white_check_mark: | -| nodeJS | | :white_check_mark: | :white_check_mark: | -| jsBrowser | | :white_check_mark: | :white_check_mark: | -| wasmJsBrowser | | :white_check_mark: | :white_check_mark: | -| JVM | :white_check_mark: | :white_check_mark: | | -| Linux | | :white_check_mark: | | -| Windows | | :white_check_mark: | | +| Platforms | Ads | Images | Logging | Sound | +|:--------------|:------------------:|:------------------------:|:------------------:|:------------------------:| +| Android | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| iOS | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| macOS | :no_entry_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| watchOS | :no_entry_sign: | :no_entry_sign: | :white_check_mark: | :white_check_mark: | +| tvOS | :no_entry_sign: | :hourglass_flowing_sand: | :white_check_mark: | :white_check_mark: | +| nodeJS | :no_entry_sign: | :hourglass_flowing_sand: | :white_check_mark: | :white_check_mark: | +| jsBrowser | :no_entry_sign: | :hourglass_flowing_sand: | :white_check_mark: | :white_check_mark: | +| wasmJsBrowser | :no_entry_sign: | :hourglass_flowing_sand: | :white_check_mark: | :white_check_mark: | +| JVM | :no_entry_sign: | :white_check_mark: | :white_check_mark: | :hourglass_flowing_sand: | +| Linux | :no_entry_sign: | :hourglass_flowing_sand: | :white_check_mark: | :hourglass_flowing_sand: | +| Windows | :no_entry_sign: | :hourglass_flowing_sand: | :white_check_mark: | :hourglass_flowing_sand: | ## Documentation * [Basic-Images](basic-images/README.md) [![Maven Central](https://img.shields.io/maven-central/v/app.lexilabs.basic/basic-images?color=blue)](https://central.sonatype.com/artifact/app.lexilabs.basic/basic-images) * [Basic-Logging](basic-logging/README.md) [![Maven Central](https://img.shields.io/maven-central/v/app.lexilabs.basic/basic-logging?color=blue)](https://central.sonatype.com/artifact/app.lexilabs.basic/basic-logging) * [Basic-Sound](basic-sound/README.md) [![Maven Central](https://img.shields.io/maven-central/v/app.lexilabs.basic/basic-sound?color=blue)](https://central.sonatype.com/artifact/app.lexilabs.basic/basic-sound) +* [Basic-Ads](basic-ads/README.md) [![MavenCentral](https://img.shields.io/maven-central/v/app.lexilabs.basic/basic-ads?color=blue)](https://central.sonatype.com/artifact/app.lexilabs.basic/basic-ads) ## Quick Start Add your dependencies from Maven @@ -37,6 +38,7 @@ lexilabs-basic = "+" # gets the latest version lexilabs-basic-images = { module = "app.lexilabs.basic:basic-images", version.ref = "lexilabs-basic" } lexilabs-basic-logging = { module = "app.lexilabs.basic:basic-logging", version.ref = "lexilabs-basic" } lexilabs-basic-sound = { module = "app.lexilabs.basic:basic-sound", version.ref = "lexilabs-basic" } +lexilabs-basic-ads = { module = "app.lexilabs.basic:basic-ads", version.ref = "lexilabs-basic" } ``` then include the library in your gradle build ```kotlin @@ -46,6 +48,7 @@ sourceSets { implementation(libs.lexilabs.basic.images) implementation(libs.lexilabs.basic.logging) implementation(libs.lexilabs.basic.sound) + implementation(libs.lexilabs.basic.ads) } } ``` \ No newline at end of file diff --git a/basic-ads/README.md b/basic-ads/README.md new file mode 100644 index 0000000..88283d1 --- /dev/null +++ b/basic-ads/README.md @@ -0,0 +1,113 @@ +# Basic-Ads +basic + +[Basic-Ads](https://basic.lexilabs.app/basic-ads) [![Maven Central](https://img.shields.io/maven-central/v/app.lexilabs.basic/basic-ads?color=blue)](https://central.sonatype.com/artifact/app.lexilabs.basic/basic-ads) + +A Kotlin Multiplatform library to rapidly get Gooble AdMob running on Android and iOS + +![badge-android](http://img.shields.io/badge/android-full_support-65c663.svg?style=flat) +![badge-ios](http://img.shields.io/badge/ios-full_support-65c663.svg?style=flat) + +### How it works +Basic-Ads uses the existing Android and iOS Google AdMob libraries to display ads as `Composables`. +A [full walkthrough](https://medium.com/@robert.jamison/composable-ads-f8795924aa0d) is available on my Medium Blog. + +## Preparation +For **Android**, complete the steps in AdMob's instructions: + +* [Configure your app](https://developers.google.com/admob/android/quick-start#import_the_mobile_ads_sdk) + +For **iOS**, complete the steps in AdMob's instructions: + +* [Import the Mobile Ads SDK](https://developers.google.com/admob/ios/quick-start#import_the_mobile_ads_sdk) + +* [Update your Info.plist](https://developers.google.com/admob/ios/quick-start#update_your_infoplist) + +***NOTE: For Xcode 13+, you can update your [Custom iOS Target Properties](https://useyourloaf.com/blog/xcode-13-missing-info.plist/).*** + +## Installation +Add your dependencies from Maven +```toml +# in your 'libs.versions.toml' file +[versions] +lexilabs-basic = "+" # gets the latest version +google-play-services-ads = "+" # you did this during the preparation step + +[libraries] +lexilabs-basic-images = { module = "app.lexilabs.basic:basic-ads", version.ref = "lexilabs-basic"} +google-play-services-ads = { module = "com.google.android.gms:play-services-ads", version.ref = "google-play-services-ads"} +``` + +then include the library in your gradle build +```kotlin +// in your 'composeApp/build.gradle.kts' file +sourceSets { + commonMain.dependencies { + implementation(libs.lexilabs.basic.ads) + implementation(libs.google.play.services.ads) + } +} +``` + +## Usage +Call [BasicAds.initialize] in your `commonMain` before building ads. +***NOTE: You do not need to initialize within each platform.*** + +```kotlin +// in your 'composeApp/src/commonMain/App.kt' file +@OptIn(DependsOnGoogleMobileAds::class) +@Composable +fun App() { + // You'll need to access your platform-specific context (Android) or null (iOS) to pass as an `Any?` argument + BasicAds.initialize( + platformContext + ) + //... +} +``` + +Now you can build ads: + +```kotlin +// in your 'composeApp/src/commonMain/AdScreen.kt' file +@Composable +fun AdScreen() { + BannerAd() // Results in a Test Banner Ad being created + // You'll need to access your platform-specific Activity (Android) or null (iOS) to pass as an `Any?` argument + InterstitialAd(activity) // Results in a Test Interstitial Ad being created + RewardedInterstitialAd(activity) // Results in a Test Rewarded Interstitial Ad (Beta) being created + RewardedAd(activity) // Results in a Test Rewarded Ad being created +} +``` + +If you want to customize your ad experience, you can take advantage of lambdas: +```kotlin +// in your 'composeApp/src/commonMain/AdScreen.kt' file +@Composable +fun AdScreen() { + // You'll need to access your platform-specific Activity (Android) or null (iOS) to pass as an `Any?` argument + RewardedAd( + activity = activity, + adUnitId = AdUnitId.autoSelect( + "YOUR_ANDROID_AD_UNIT_ID", + "YOUR_IOS_AD_UNIT_ID" + ), + onDismissed = { + doSomethingElse() + }, + onRewardEarned = { + playSomeCoolSound() + } + ) +} +``` + +In case you need it, here's some [additional documentation](https://basic.lexilabs.app/basic-ads) + +### \[Advanced Users Only\] How to deal with building this garbage +1. Find a large cup. It must exist in the real world. +2. Fill said cup to the brim with some sort of caffeinated beverage. +3. Click `File` > `Invalidate Caches...`, check all boxes and hit `invalidate and restart` +4. Click `Sync` for gradle if banner exists. Ignore the flood of warning lights and klaxons. +5. Click `Build` > `Clean Cache`. Ignore the plethora of errors +6.Once complete, click `Build` > `Rebuild Project`. NOTE: Despite religious preference, prayer is encouraged. diff --git a/basic-ads/build.gradle.kts b/basic-ads/build.gradle.kts new file mode 100644 index 0000000..a324a58 --- /dev/null +++ b/basic-ads/build.gradle.kts @@ -0,0 +1,102 @@ +import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi +import org.jetbrains.kotlin.gradle.dsl.JvmTarget +import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget + +plugins { + alias(libs.plugins.multiplatform) + alias(libs.plugins.android.library) + alias(libs.plugins.kotlinx.binary.compatibility.validator) + alias(libs.plugins.dokka) + alias(libs.plugins.native.cocoapods) + alias(libs.plugins.composeCompiler) + `maven-publish` + signing +} + +kotlin { + + // FORCES CHECK OF PUBLIC API DECLARATIONS + explicitApi() + + listOf( + iosX64(), // mobile + iosArm64(), // mobile + iosSimulatorArm64(), // mobile + ).forEach { + it.binaries.framework { + baseName = "basic-ads" + isStatic = true + } + } + + cocoapods { + ios.deploymentTarget = libs.versions.ios.deploymentTarget.get() + framework { + baseName = "GoogleMobileAds" + // Enable "isStatic", build, disable "isStatic", then build again. +// isStatic = true + } + noPodspec() + pod("Google-Mobile-Ads-SDK") { + moduleName = "GoogleMobileAds" + version = libs.versions.adMob.cocoapods.get() + extraOpts += listOf("-compiler-option", "-fmodules") + } + } + + sourceSets { + commonMain.dependencies { + implementation(libs.compose.foundation) + implementation(libs.annotations) + implementation(project(":basic-logging")) + } + androidMain.dependencies { + implementation(libs.compose.ui) + compileOnly(libs.google.play.services.ads) + } + iosMain.dependencies {} + } + + //https://kotlinlang.org/docs/native-objc-interop.html#export-of-kdoc-comments-to-generated-objective-c-headers + targets.withType { + compilations["main"].compileTaskProvider.configure{ + compilerOptions { + freeCompilerArgs.add("-Xexport-kdoc") + } + } + } + + // https://youtrack.jetbrains.com/issue/KT-61573 + @OptIn(ExperimentalKotlinGradlePluginApi::class) + compilerOptions { + freeCompilerArgs.add("-Xexpect-actual-classes") + } + + // Android JVM target target options + androidTarget { + publishLibraryVariants("release", "debug") + compilations.all{ + compileTaskProvider.configure{ + compilerOptions { + jvmTarget.set(JvmTarget.JVM_17) + } + } + } + } +} + +android { + namespace = "app.lexilabs.basic.ads" + compileSdk = 34 + + defaultConfig { + minSdk = 24 + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + buildFeatures{ + compose = true + } +} \ No newline at end of file diff --git a/basic-ads/src/androidMain/kotlin/app/lexilabs/basic/ads/AdLoader.kt b/basic-ads/src/androidMain/kotlin/app/lexilabs/basic/ads/AdLoader.kt new file mode 100644 index 0000000..45fff37 --- /dev/null +++ b/basic-ads/src/androidMain/kotlin/app/lexilabs/basic/ads/AdLoader.kt @@ -0,0 +1,246 @@ +package app.lexilabs.basic.ads + +import android.annotation.SuppressLint +import android.app.Activity +import androidx.annotation.RequiresPermission +import app.lexilabs.basic.logging.Log + +public actual typealias AdRequest = com.google.android.gms.ads.AdRequest + +public actual class AdLoader { + + private val tag: String = "AdLoader" + private var interstitialAd: com.google.android.gms.ads.interstitial.InterstitialAd? = null + private var interstitialAdUnitId: String = "" + private var rewardedInterstitialAd: com.google.android.gms.ads.rewardedinterstitial.RewardedInterstitialAd? = null + private var rewardedInterstitialAdUnitId: String = "" + private var rewardedAd: com.google.android.gms.ads.rewarded.RewardedAd? = null + private var rewardedAdUnitId: String = "" + + @RequiresPermission("android.permission.INTERNET") + public actual fun requestAd(): AdRequest = + com.google.android.gms.ads.AdRequest.Builder().build() + + @RequiresPermission("android.permission.INTERNET") + public actual fun loadInterstitialAd( + activity: Any?, + adUnitId: String, + onLoaded: () -> Unit + ) { + Log.d(tag, "loadInterstitialAd: Loading") + interstitialAdUnitId = adUnitId + com.google.android.gms.ads.interstitial.InterstitialAd + .load( + activity as Activity, + adUnitId, + requestAd(), + object : com.google.android.gms.ads.interstitial.InterstitialAdLoadCallback() { + override fun onAdFailedToLoad(adError: com.google.android.gms.ads.LoadAdError) { + super.onAdFailedToLoad(adError) + Log.d(tag, "loadInterstitialAd:failure:$adError") + } + + override fun onAdLoaded(ad: com.google.android.gms.ads.interstitial.InterstitialAd) { + super.onAdLoaded(ad) + Log.d(tag, "loadInterstitialAd:success") + interstitialAd = ad + onLoaded() + } + }) + } + + @SuppressLint("MissingPermission") + @RequiresPermission("android.permission.INTERNET") + public actual fun showInterstitialAd(activity: Any?, onDismissed: () -> Unit){ +// if (interstitialAd != null) { + interstitialAd?.let { + interstitialAd?.fullScreenContentCallback = object: com.google.android.gms.ads.FullScreenContentCallback() { + override fun onAdClicked() { + super.onAdClicked() + // Called when a click is recorded for an ad. + Log.d(tag, "Ad was clicked.") + loadInterstitialAd(activity, interstitialAdUnitId) + } + + override fun onAdDismissedFullScreenContent() { + super.onAdDismissedFullScreenContent() + // Called when ad is dismissed. + Log.d(tag, "Ad dismissed fullscreen content.") + interstitialAd = null + loadInterstitialAd(activity, interstitialAdUnitId) + } + + override fun onAdFailedToShowFullScreenContent(p0: com.google.android.gms.ads.AdError) { + super.onAdFailedToShowFullScreenContent(p0) + // Called when ad fails to show. + Log.e(tag, "Ad failed to show fullscreen content.") + interstitialAd = null + } + + override fun onAdImpression() { + super.onAdImpression() + // Called when an impression is recorded for an ad. + Log.d(tag, "Ad recorded an impression.") + } + + override fun onAdShowedFullScreenContent() { + super.onAdShowedFullScreenContent() + // Called when ad is shown. + Log.d(tag, "Ad showed fullscreen content.") + } + } + // CONTINUE + (interstitialAd as com.google.android.gms.ads.interstitial.InterstitialAd).show(activity as Activity) + } ?: Log.d(tag, "The interstitial ad wasn't ready yet.") + } + + @RequiresPermission("android.permission.INTERNET") + public actual fun loadRewardedInterstitialAd( + activity: Any?, + adUnitId: String, + onLoaded: () -> Unit + ) { + rewardedInterstitialAdUnitId = adUnitId + com.google.android.gms.ads.rewardedinterstitial.RewardedInterstitialAd + .load( + activity as Activity, + adUnitId, + requestAd(), + object : com.google.android.gms.ads.rewardedinterstitial.RewardedInterstitialAdLoadCallback() { + override fun onAdFailedToLoad(adError: com.google.android.gms.ads.LoadAdError) { + super.onAdFailedToLoad(adError) + Log.d(tag, "loadRewardedInterstitialAd:failure:$adError") + } + + override fun onAdLoaded(ad: com.google.android.gms.ads.rewardedinterstitial.RewardedInterstitialAd) { + super.onAdLoaded(ad) + Log.d(tag, "loadRewardedInterstitialAd:success") + rewardedInterstitialAd = ad + onLoaded() + } + }) + } + + @SuppressLint("MissingPermission") + @RequiresPermission("android.permission.INTERNET") + public actual fun showRewardedInterstitialAd(activity: Any?, onDismissed: () -> Unit, onRewardEarned: () -> Unit){ + rewardedInterstitialAd?.let { + rewardedInterstitialAd?.fullScreenContentCallback = object: com.google.android.gms.ads.FullScreenContentCallback() { + override fun onAdClicked() { + super.onAdClicked() + // Called when a click is recorded for an ad. + Log.d(tag, "Ad was clicked.") + loadRewardedInterstitialAd(activity, rewardedInterstitialAdUnitId) + } + + override fun onAdDismissedFullScreenContent() { + super.onAdDismissedFullScreenContent() + // Called when ad is dismissed. + Log.d(tag, "Ad dismissed fullscreen content.") + rewardedInterstitialAd = null + loadRewardedInterstitialAd(activity, rewardedInterstitialAdUnitId) + } + + override fun onAdFailedToShowFullScreenContent(p0: com.google.android.gms.ads.AdError) { + super.onAdFailedToShowFullScreenContent(p0) + // Called when ad fails to show. + Log.e(tag, "Ad failed to show fullscreen content.") + rewardedInterstitialAd = null + } + + override fun onAdImpression() { + super.onAdImpression() + // Called when an impression is recorded for an ad. + Log.d(tag, "Ad recorded an impression.") + } + + override fun onAdShowedFullScreenContent() { + super.onAdShowedFullScreenContent() + // Called when ad is shown. + Log.d(tag, "Ad showed fullscreen content.") + } + } + // CONTINUE + (rewardedInterstitialAd as com.google.android.gms.ads.rewardedinterstitial.RewardedInterstitialAd).show( + activity as Activity + ) { + onRewardEarned() + } + } ?: Log.d(tag, "The rewarded interstitial ad wasn't ready yet.") + } + + @RequiresPermission("android.permission.INTERNET") + public actual fun loadRewardedAd( + activity: Any?, + adUnitId: String, + onLoaded: () -> Unit + ) { + rewardedAdUnitId = adUnitId + com.google.android.gms.ads.rewarded.RewardedAd + .load( + activity as Activity, + adUnitId, + requestAd(), + object : com.google.android.gms.ads.rewarded.RewardedAdLoadCallback() { + override fun onAdFailedToLoad(adError: com.google.android.gms.ads.LoadAdError) { + super.onAdFailedToLoad(adError) + Log.d(tag, "loadRewardedInterstitialAd:failure:$adError") + } + + override fun onAdLoaded(ad: com.google.android.gms.ads.rewarded.RewardedAd) { + super.onAdLoaded(ad) + Log.d(tag, "loadRewardedInterstitialAd:success") + rewardedAd = ad + onLoaded() + } + }) + } + + @SuppressLint("MissingPermission") + @RequiresPermission("android.permission.INTERNET") + public actual fun showRewardedAd(activity: Any?, onDismissed: () -> Unit, onRewardEarned: () -> Unit){ + rewardedAd?.let { + rewardedAd?.fullScreenContentCallback = object: com.google.android.gms.ads.FullScreenContentCallback() { + override fun onAdClicked() { + super.onAdClicked() + // Called when a click is recorded for an ad. + Log.d(tag, "Ad was clicked.") + loadRewardedAd(activity, rewardedAdUnitId) + } + + override fun onAdDismissedFullScreenContent() { + super.onAdDismissedFullScreenContent() + // Called when ad is dismissed. + Log.d(tag, "Ad dismissed fullscreen content.") + rewardedAd = null + loadRewardedAd(activity, rewardedAdUnitId) + } + + override fun onAdFailedToShowFullScreenContent(p0: com.google.android.gms.ads.AdError) { + super.onAdFailedToShowFullScreenContent(p0) + // Called when ad fails to show. + Log.e(tag, "Ad failed to show fullscreen content.") + rewardedAd = null + } + + override fun onAdImpression() { + super.onAdImpression() + // Called when an impression is recorded for an ad. + Log.d(tag, "Ad recorded an impression.") + } + + override fun onAdShowedFullScreenContent() { + super.onAdShowedFullScreenContent() + // Called when ad is shown. + Log.d(tag, "Ad showed fullscreen content.") + } + } + // CONTINUE + (rewardedAd as com.google.android.gms.ads.rewarded.RewardedAd).show( + activity as Activity + ) { + onRewardEarned() + } + } ?: Log.d(tag, "The rewarded interstitial ad wasn't ready yet.") + } +} \ No newline at end of file diff --git a/basic-ads/src/androidMain/kotlin/app/lexilabs/basic/ads/AdSize.kt b/basic-ads/src/androidMain/kotlin/app/lexilabs/basic/ads/AdSize.kt new file mode 100644 index 0000000..5043075 --- /dev/null +++ b/basic-ads/src/androidMain/kotlin/app/lexilabs/basic/ads/AdSize.kt @@ -0,0 +1,22 @@ +package app.lexilabs.basic.ads + +public actual class AdSize public actual constructor(public actual val width: Int, public actual val height: Int) { + + init { + com.google.android.gms.ads.AdSize(width, height) + } + + public actual companion object { + public actual val FULL_WIDTH: Int = com.google.android.gms.ads.AdSize.FULL_WIDTH + public actual val AUTO_HEIGHT: Int = com.google.android.gms.ads.AdSize.AUTO_HEIGHT + public actual val BANNER: AdSize = com.google.android.gms.ads.AdSize.BANNER.toCommon() + public actual val FULL_BANNER: AdSize = com.google.android.gms.ads.AdSize.FULL_BANNER.toCommon() + public actual val LARGE_BANNER: AdSize = com.google.android.gms.ads.AdSize.LARGE_BANNER.toCommon() + public actual val LEADERBOARD: AdSize = com.google.android.gms.ads.AdSize.LEADERBOARD.toCommon() + public actual val MEDIUM_RECTANGLE: AdSize = com.google.android.gms.ads.AdSize.MEDIUM_RECTANGLE.toCommon() + public actual val WIDE_SKYSCRAPER: AdSize = com.google.android.gms.ads.AdSize.WIDE_SKYSCRAPER.toCommon() + public actual val FLUID: AdSize = com.google.android.gms.ads.AdSize.FLUID.toCommon() + public actual val INVALID: AdSize = com.google.android.gms.ads.AdSize.INVALID.toCommon() + public actual val SEARCH: AdSize = com.google.android.gms.ads.AdSize.SEARCH.toCommon() + } +} diff --git a/basic-ads/src/androidMain/kotlin/app/lexilabs/basic/ads/AdUnitId.kt b/basic-ads/src/androidMain/kotlin/app/lexilabs/basic/ads/AdUnitId.kt new file mode 100644 index 0000000..5433276 --- /dev/null +++ b/basic-ads/src/androidMain/kotlin/app/lexilabs/basic/ads/AdUnitId.kt @@ -0,0 +1,11 @@ +package app.lexilabs.basic.ads + +public actual object AdUnitId { + public actual fun autoSelect(androidAdUnitId: String?, iosAdUnitId: String?): String { + return androidAdUnitId ?: "" + } + public actual const val BANNER_DEFAULT: String = "ca-app-pub-3940256099942544/9214589741" + public actual const val INTERSTITIAL_DEFAULT: String = "ca-app-pub-3940256099942544/1033173712" + public actual const val REWARDED_INTERSTITIAL_DEFAULT: String = "ca-app-pub-3940256099942544/5354046379" + public actual const val REWARDED_DEFAULT: String = "ca-app-pub-3940256099942544/5224354917" +} \ No newline at end of file diff --git a/basic-ads/src/androidMain/kotlin/app/lexilabs/basic/ads/BasicAds.kt b/basic-ads/src/androidMain/kotlin/app/lexilabs/basic/ads/BasicAds.kt new file mode 100644 index 0000000..7a8123d --- /dev/null +++ b/basic-ads/src/androidMain/kotlin/app/lexilabs/basic/ads/BasicAds.kt @@ -0,0 +1,50 @@ +package app.lexilabs.basic.ads + +import android.content.Context +import androidx.annotation.MainThread +import androidx.annotation.RequiresPermission + +public actual typealias AdError = com.google.android.gms.ads.AdError +//public actual typealias InitializationStatus = com.google.android.gms.ads.initialization.InitializationStatus +public typealias AdView = com.google.android.gms.ads.AdView + +public actual object BasicAds { + + public actual val errorDomain: String + get() = com.google.android.gms.ads.MobileAds.ERROR_DOMAIN + + @DependsOnGoogleMobileAds + public actual var configuration: RequestConfiguration + get() = com.google.android.gms.ads.MobileAds.getRequestConfiguration().toCommon() + set(config) = com.google.android.gms.ads.MobileAds.setRequestConfiguration(config.toAndroid()) + + public actual val version: String = com.google.android.gms.ads.MobileAds.getVersion().toString() + + public actual val initialized: Boolean + get() = com.google.android.gms.ads.MobileAds.getInitializationStatus()?.adapterStatusMap?.isNotEmpty() ?: false + + @MainThread + @RequiresPermission("android.permission.INTERNET") + public actual fun initialize(context: Any?) { + com.google.android.gms.ads.MobileAds.initialize(context as Context) + } + + public actual fun disableMediationAdapterInitialization(context: Any?) { + com.google.android.gms.ads.MobileAds.disableMediationAdapterInitialization(context as Context) + } + + public actual fun openDebugMenu(context: Any?, adUnitId: String) { + com.google.android.gms.ads.MobileAds.openDebugMenu(context as Context, adUnitId) + } + + public actual fun setAppMuted(muted: Boolean) { + com.google.android.gms.ads.MobileAds.setAppMuted(muted) + } + + public actual fun setAppVolume(volume: Float) { + com.google.android.gms.ads.MobileAds.setAppVolume(volume) + } + +// public actual fun getInitializationStatus(): InitializationStatus? = +// com.google.android.gms.ads.MobileAds.getInitializationStatus() +} diff --git a/basic-ads/src/androidMain/kotlin/app/lexilabs/basic/ads/Composables.kt b/basic-ads/src/androidMain/kotlin/app/lexilabs/basic/ads/Composables.kt new file mode 100644 index 0000000..dd4b257 --- /dev/null +++ b/basic-ads/src/androidMain/kotlin/app/lexilabs/basic/ads/Composables.kt @@ -0,0 +1,67 @@ +package app.lexilabs.basic.ads + +import androidx.annotation.RequiresPermission +import androidx.compose.runtime.Composable +import androidx.compose.ui.viewinterop.AndroidView + +@RequiresPermission("android.permission.INTERNET") +@Composable +public actual fun BannerAd(adUnitId: String, adSize: AdSize) { + AndroidView( + factory = { context -> + val adView = AdView(context) + adView.apply { + this.setAdSize(adSize.toAndroid()) + this.adUnitId = adUnitId + this.loadAd(AdLoader().requestAd()) + } + } + ) +} + +@RequiresPermission("android.permission.INTERNET") +@Composable +public actual fun InterstitialAd(activity: Any?, adUnitId: String, onDismissed: () -> Unit) { + val adLoader = AdLoader() + adLoader.loadInterstitialAd( + activity, + adUnitId, + onLoaded = { + adLoader.showInterstitialAd(activity) { onDismissed() } + } + ) +} + +@RequiresPermission("android.permission.INTERNET") +@Composable +public actual fun RewardedAd(activity: Any?, adUnitId: String, onDismissed: () -> Unit, onRewardEarned: () -> Unit) { + val adLoader = AdLoader() + adLoader.loadRewardedAd( + activity = activity, + adUnitId = adUnitId, + onLoaded = { + adLoader.showRewardedAd( + activity = activity, + onDismissed = { onDismissed() }, + onRewardEarned = { onRewardEarned() } + ) + } + ) +} + +@RequiresPermission("android.permission.INTERNET") +@Composable +public actual fun RewardedInterstitialAd(activity: Any?, adUnitId: String, onDismissed: () -> Unit, onRewardEarned: () -> Unit) { + val adLoader = AdLoader() + adLoader.loadRewardedInterstitialAd( + activity = activity, + adUnitId = adUnitId, + onLoaded = { + adLoader.showRewardedInterstitialAd( + activity = activity, + onDismissed = { onDismissed() }, + onRewardEarned = { onRewardEarned() } + ) + } + ) +} \ No newline at end of file diff --git a/basic-ads/src/androidMain/kotlin/app/lexilabs/basic/ads/Converters.kt b/basic-ads/src/androidMain/kotlin/app/lexilabs/basic/ads/Converters.kt new file mode 100644 index 0000000..058bb5f --- /dev/null +++ b/basic-ads/src/androidMain/kotlin/app/lexilabs/basic/ads/Converters.kt @@ -0,0 +1,37 @@ +package app.lexilabs.basic.ads + +public fun AdSize.toAndroid(): com.google.android.gms.ads.AdSize = + com.google.android.gms.ads.AdSize(this.width, this.height) + +public fun com.google.android.gms.ads.AdSize.toCommon(): AdSize = + AdSize(width = this.width, height = this.height) + +@DependsOnGoogleMobileAds +public fun RequestConfiguration.toAndroid(): com.google.android.gms.ads.RequestConfiguration = + com.google.android.gms.ads.RequestConfiguration.Builder() + .setMaxAdContentRating(maxAdContentRating) + .setPublisherPrivacyPersonalizationState(publisherPrivacyPersonalizationState.toAndroid()) + .setTagForChildDirectedTreatment(tagForChildDirectedTreatment) + .setTagForUnderAgeOfConsent(tagForUnderAgeOfConsent) + .setTestDeviceIds(testDeviceIds) + .build() + +@DependsOnGoogleMobileAds +public fun com.google.android.gms.ads.RequestConfiguration.toCommon(): RequestConfiguration = + RequestConfiguration( + maxAdContentRating = maxAdContentRating, + publisherPrivacyPersonalizationState = publisherPrivacyPersonalizationState.toCommon(), + tagForChildDirectedTreatment = tagForChildDirectedTreatment, + tagForUnderAgeOfConsent = tagForUnderAgeOfConsent, + testDeviceIds = testDeviceIds + ) + +@DependsOnGoogleMobileAds +public fun RequestConfiguration.PublisherPrivacyPersonalizationState.toAndroid( +): com.google.android.gms.ads.RequestConfiguration.PublisherPrivacyPersonalizationState = + com.google.android.gms.ads.RequestConfiguration.PublisherPrivacyPersonalizationState.valueOf(this.name) + +@DependsOnGoogleMobileAds +public fun com.google.android.gms.ads.RequestConfiguration.PublisherPrivacyPersonalizationState.toCommon( +): RequestConfiguration.PublisherPrivacyPersonalizationState = + RequestConfiguration.PublisherPrivacyPersonalizationState.fromInt(this.ordinal) \ No newline at end of file diff --git a/basic-ads/src/commonMain/kotlin/app/lexilabs/basic/ads/AdError.kt b/basic-ads/src/commonMain/kotlin/app/lexilabs/basic/ads/AdError.kt new file mode 100644 index 0000000..2071316 --- /dev/null +++ b/basic-ads/src/commonMain/kotlin/app/lexilabs/basic/ads/AdError.kt @@ -0,0 +1,7 @@ +package app.lexilabs.basic.ads + +/** + * Error information about why an ad didn't load. + */ +@DependsOnGoogleMobileAds +public expect open class AdError \ No newline at end of file diff --git a/basic-ads/src/commonMain/kotlin/app/lexilabs/basic/ads/AdLoader.kt b/basic-ads/src/commonMain/kotlin/app/lexilabs/basic/ads/AdLoader.kt new file mode 100644 index 0000000..36105a8 --- /dev/null +++ b/basic-ads/src/commonMain/kotlin/app/lexilabs/basic/ads/AdLoader.kt @@ -0,0 +1,103 @@ +package app.lexilabs.basic.ads + +/** + * Generates components required for ad requests + */ +public expect class AdRequest + +/** + * Used to send an [AdRequest], hold loaded Ads, show fullscreen ads, and execute lambda expressions. + * Most functions require an [Any] value containing an Android Activity or null for iOS. + * + * @see requestAd + * @see loadInterstitialAd + * @see showInterstitialAd + * @see loadRewardedInterstitialAd + * @see showRewardedInterstitialAd + * @see loadRewardedAd + * @see showRewardedAd + */ +public expect class AdLoader() { + /** + * Submits an [AdRequest] and returns the resulting [AdRequest] + * Loaded ads are stored privately in each instantiation of [AdLoader]. + * As long as [showInterstitialAd] is called from the same [AdLoader] instance, the ad will display. + * @return a loaded or failed [AdRequest] + */ + public fun requestAd(): AdRequest + + /** + * Requests and loads a fullscreen AdMob ad and notifies load completion via [onLoaded] lambda. + * Loaded ads are stored privately in each instantiation of [AdLoader]. + * As long as [showInterstitialAd] is called from the same [AdLoader] instance, the ad will display. + * @param activity Android Activity or iOS null value stored in an [Any] variable + * @param adUnitId AdMob AdUnitId [String] used by [requestAd] to load the ad + * @param onLoaded Lambda expression that executes when the [AdRequest] has fully loaded + * @author rjamison@lexilabs.app + * @see showInterstitialAd + */ + public fun loadInterstitialAd(activity: Any?, adUnitId: String, onLoaded: () -> Unit = {}) + + /** + * Shows a fullscreen AdMob ad and notifies when the user closes the ad via [onDismissed] lambda. + * Loaded ads are stored privately in each instantiation of [AdLoader]. + * As long as [loadInterstitialAd] is called from the same [AdLoader] instance, the ad will display. + * @param activity Android Activity or iOS null value stored in an [Any] variable + * @param onDismissed Lambda expression that executes when the user closes the ad + * @author rjamison@lexilabs.app + * @see loadInterstitialAd + */ + public fun showInterstitialAd(activity: Any?, onDismissed: () -> Unit = {}) + + /** + * Requests and loads a fullscreen AdMob ad and notifies load completion via [onLoaded] lambda. + * Loaded ads are stored privately in each instantiation of [AdLoader]. + * As long as [showRewardedInterstitialAd] is called from the same [AdLoader] instance, the ad will display. + * @param activity Android Activity or iOS null value stored in an [Any] variable + * @param adUnitId AdMob AdUnitId [String] used by [requestAd] to load the ad + * @param onLoaded Lambda expression that executes when the [AdRequest] has fully loaded + * @author rjamison@lexilabs.app + * @see showRewardedInterstitialAd + */ + public fun loadRewardedInterstitialAd(activity: Any?, adUnitId: String, onLoaded: () -> Unit = {}) + + /** + * Shows a rewarded and fullscreen AdMob ad. + * It notifies when the user closes the ad via [onDismissed] lambda and + * when the user earned a reward within the ad using lambda [onRewardEarned] + * Loaded ads are stored privately in each instantiation of [AdLoader]. + * As long as [loadRewardedInterstitialAd] is called from the same [AdLoader] instance, the ad will display. + * @param activity Android Activity or iOS null value stored in an [Any] variable + * @param onDismissed Lambda expression that executes when the user closes the ad + * @param onRewardEarned Lambda expression that executes when the user earns a reward from the ad + * @author rjamison@lexilabs.app + * @see loadRewardedInterstitialAd + */ + public fun showRewardedInterstitialAd(activity: Any?, onDismissed: () -> Unit = {}, onRewardEarned: () -> Unit = {}) + + /** + * Requests and loads a fullscreen AdMob ad and notifies load completion via [onLoaded] lambda. + * Loaded ads are stored privately in each instantiation of [AdLoader]. + * As long as [showRewardedAd] is called from the same [AdLoader] instance, the ad will display. + * @param activity Android Activity or iOS null value stored in an [Any] variable + * @param adUnitId AdMob AdUnitId [String] used by [requestAd] to load the ad + * @param onLoaded Lambda expression that executes when the [AdRequest] has fully loaded + * @author rjamison@lexilabs.app + * @see showRewardedAd + */ + public fun loadRewardedAd(activity: Any?, adUnitId: String, onLoaded: () -> Unit = {}) + + /** + * Shows a rewarded and fullscreen AdMob ad. + * It notifies when the user closes the ad via [onDismissed] lambda and + * when the user earned a reward within the ad using lambda [onRewardEarned] + * Loaded ads are stored privately in each instantiation of [AdLoader]. + * As long as [loadRewardedAd] is called from the same [AdLoader] instance, the ad will display. + * @param activity Android Activity or iOS null value stored in an [Any] variable + * @param onDismissed Lambda expression that executes when the user closes the ad + * @param onRewardEarned Lambda expression that executes when the user earns a reward from the ad + * @author rjamison@lexilabs.app + * @see loadRewardedAd + */ + public fun showRewardedAd(activity: Any?, onDismissed: () -> Unit = {}, onRewardEarned: () -> Unit = {}) +} \ No newline at end of file diff --git a/basic-ads/src/commonMain/kotlin/app/lexilabs/basic/ads/AdSize.kt b/basic-ads/src/commonMain/kotlin/app/lexilabs/basic/ads/AdSize.kt new file mode 100644 index 0000000..75268ab --- /dev/null +++ b/basic-ads/src/commonMain/kotlin/app/lexilabs/basic/ads/AdSize.kt @@ -0,0 +1,45 @@ +package app.lexilabs.basic.ads + +/** + * Based on the AdMob implementation of AdSize, this module enables Android-like syntax to be used multiplatform. + * @param width The width of the ad in whatever unit of measurement Google came up with + * @param height The height of the ad in whatever unit of measurement Google came up with + * @see FULL_WIDTH + * @see AUTO_HEIGHT + * @see BANNER + * @see FULL_BANNER + * @see LARGE_BANNER + * @see LEADERBOARD + * @see MEDIUM_RECTANGLE + * @see WIDE_SKYSCRAPER + * @see FLUID + * @see INVALID + * @see SEARCH + */ +@DependsOnGoogleMobileAds +public expect class AdSize public constructor(width: Int, height: Int) { + + /** + * The width of the ad in whatever unit of measurement Google came up with + */ + public val width: Int + + /** + * The height of the ad in whatever unit of measurement Google came up with + */ + public val height: Int + + public companion object { + public val FULL_WIDTH: Int + public val AUTO_HEIGHT: Int + public val BANNER: AdSize + public val FULL_BANNER: AdSize + public val LARGE_BANNER: AdSize + public val LEADERBOARD: AdSize + public val MEDIUM_RECTANGLE: AdSize + public val WIDE_SKYSCRAPER: AdSize + public val FLUID: AdSize + public val INVALID: AdSize + public val SEARCH: AdSize + } +} \ No newline at end of file diff --git a/basic-ads/src/commonMain/kotlin/app/lexilabs/basic/ads/AdUnitId.kt b/basic-ads/src/commonMain/kotlin/app/lexilabs/basic/ads/AdUnitId.kt new file mode 100644 index 0000000..fe30380 --- /dev/null +++ b/basic-ads/src/commonMain/kotlin/app/lexilabs/basic/ads/AdUnitId.kt @@ -0,0 +1,20 @@ +package app.lexilabs.basic.ads + +/** + * An object used to hold functions related to AdMob AdUnitIds + * @see AdUnitId.autoSelect + */ +public expect object AdUnitId { + /** + * Provides a way of selecting an AdMob AdUnitId by platform during runtime. + * This function works for any ad type. + * @param androidAdUnitId provide an AdUnitId [String] for Android implementation + * @param iosAdUnitId provide an AdUnitId [String] for iOS implementation + */ + public fun autoSelect(androidAdUnitId: String? = null, iosAdUnitId: String? = null): String + + public val BANNER_DEFAULT: String + public val INTERSTITIAL_DEFAULT: String + public val REWARDED_INTERSTITIAL_DEFAULT: String + public val REWARDED_DEFAULT: String +} \ No newline at end of file diff --git a/basic-ads/src/commonMain/kotlin/app/lexilabs/basic/ads/BasicAds.kt b/basic-ads/src/commonMain/kotlin/app/lexilabs/basic/ads/BasicAds.kt new file mode 100644 index 0000000..09c9fb7 --- /dev/null +++ b/basic-ads/src/commonMain/kotlin/app/lexilabs/basic/ads/BasicAds.kt @@ -0,0 +1,88 @@ +package app.lexilabs.basic.ads + +import androidx.annotation.MainThread + +/** + * The main module for instantiating Android and iOS implementations of AdMob + * @property errorDomain The domain name of which errors occur on + * @property configuration The [RequestConfiguration] for the instantiation of AdMob + * @property version The version of AdMob being used + * @property initialized Whether or not the [BasicAds.initialize] was called successfully + * @see initialize + * @see disableMediationAdapterInitialization + * @see openDebugMenu + * @see setAppMuted + * @see setAppVolume + */ +@DependsOnGoogleMobileAds +public expect object BasicAds { + /** + * The domain name of which errors occur on + * @see DependsOnGoogleMobileAds + * @see BasicAds + */ + public val errorDomain: String + + /** + * The [RequestConfiguration] for the instantiation of AdMob + * @see DependsOnGoogleMobileAds + * @see BasicAds + */ + public var configuration: RequestConfiguration + + /** + * The version of AdMob being used + * @see DependsOnGoogleMobileAds + * @see BasicAds + */ + public val version: String + + /** + * Whether or not the [BasicAds.initialize] was called successfully + * @see DependsOnGoogleMobileAds + * @see BasicAds + */ + public val initialized: Boolean + + /** + * The main function for instantiating Android and iOS implementations of AdMob. + * It is equivalent to Android's `MobileAds.Initialize(context)`. + * @throws Exception when run outside the [MainThread] + * @param context Android Context or null for iOS, passed in an [Any] variable + * @see DependsOnGoogleMobileAds + * @see BasicAds + */ + @MainThread + public fun initialize(context: Any?) +// public fun getInitializationStatus(): InitializationStatus? + + /** + * I have no idea what this does, but its here and it works on Android and iOS + * @param context Android Context or null for iOS, passed in an [Any] variable + * @see DependsOnGoogleMobileAds + * @see BasicAds + */ + public fun disableMediationAdapterInitialization(context: Any?) + + /** + * This opens the Debug Menu, which I have never personally done myself. + * @param context Android Context or null for iOS, passed in an [Any] variable + * @param adUnitId AdMob AdUnitId [String] for [AdRequest] + * @see DependsOnGoogleMobileAds + * @see BasicAds + */ + public fun openDebugMenu(context: Any?, adUnitId: String) + + /** + * Mutes or unmutes ads + * @param muted a [Boolean] value that should evaluate `true` when muted and `false` when unmuted + */ + public fun setAppMuted(muted: Boolean) + + /** + * Sets the volume of ads based on a [Float] value between `0.0` for muted and `1.0` for full volume. + * @param volume a [Float] value between `0.0` for muted and `1.0` for full volume. + */ + public fun setAppVolume(volume: Float) +} + diff --git a/basic-ads/src/commonMain/kotlin/app/lexilabs/basic/ads/Composables.kt b/basic-ads/src/commonMain/kotlin/app/lexilabs/basic/ads/Composables.kt new file mode 100644 index 0000000..15869d7 --- /dev/null +++ b/basic-ads/src/commonMain/kotlin/app/lexilabs/basic/ads/Composables.kt @@ -0,0 +1,58 @@ +package app.lexilabs.basic.ads + +import androidx.compose.runtime.Composable + +/** + * Loads and displays a Banner Ad using a [Composable]. + * @param adUnitId Your AdMob AdUnitId [String] + * @param adSize Your AdMob [AdSize] + * @see AdUnitId.autoSelect + */ +@DependsOnGoogleMobileAds +@Composable public expect fun BannerAd( + adUnitId: String = AdUnitId.BANNER_DEFAULT, + adSize: AdSize = AdSize.FULL_BANNER +) + +/** + * Loads and displays an Interstitial Ad using a [Composable]. + * @param adUnitId Your AdMob AdUnitId [String] + * @param onDismissed Lambda that executes when the user closes the ad + * @see AdUnitId.autoSelect + */ +@DependsOnGoogleMobileAds +@Composable public expect fun InterstitialAd( + activity: Any? = null, + adUnitId: String = AdUnitId.INTERSTITIAL_DEFAULT, + onDismissed: () -> Unit = {} +) + +/** + * Loads and displays a Rewarded Ad using a [Composable]. + * @param adUnitId Your AdMob AdUnitId [String] + * @param onDismissed Lambda that executes when the user closes the ad + * @param onRewardEarned Lambda that executes when the user has earned an ad-related reward + * @see AdUnitId.autoSelect + */ +@DependsOnGoogleMobileAds +@Composable public expect fun RewardedAd( + activity: Any? = null, + adUnitId: String = AdUnitId.REWARDED_DEFAULT, + onDismissed: () -> Unit = {}, + onRewardEarned: () -> Unit = {} +) + +/** + * Loads and displays a Rewarded Interstitial Ad using a [Composable]. + * @param adUnitId Your AdMob AdUnitId [String] + * @param onDismissed Lambda that executes when the user closes the ad + * @param onRewardEarned Lambda that executes when the user has earned an ad-related reward + * @see AdUnitId.autoSelect + */ +@DependsOnGoogleMobileAds +@Composable public expect fun RewardedInterstitialAd( + activity: Any? = null, + adUnitId: String = AdUnitId.REWARDED_INTERSTITIAL_DEFAULT, + onDismissed: () -> Unit = {}, + onRewardEarned: () -> Unit = {} +) \ No newline at end of file diff --git a/basic-ads/src/commonMain/kotlin/app/lexilabs/basic/ads/DependsOnGoogleMobileAds.kt b/basic-ads/src/commonMain/kotlin/app/lexilabs/basic/ads/DependsOnGoogleMobileAds.kt new file mode 100644 index 0000000..9cc59ae --- /dev/null +++ b/basic-ads/src/commonMain/kotlin/app/lexilabs/basic/ads/DependsOnGoogleMobileAds.kt @@ -0,0 +1,21 @@ +package app.lexilabs.basic.ads + +/** + * For **Android**, complete the steps in AdMob's instructions: + * * [Configure your app](https://developers.google.com/admob/android/quick-start#import_the_mobile_ads_sdk) + * + * For **iOS**, complete the steps in AdMob's instructions: + * * [Import the Mobile Ads SDK](https://developers.google.com/admob/ios/quick-start#import_the_mobile_ads_sdk) + * * [Update your Info.plist](https://developers.google.com/admob/ios/quick-start#update_your_infoplist) + * + * ***NOTE: For Xcode 13+, you can update your [Custom iOS Target Properties](https://useyourloaf.com/blog/xcode-13-missing-info.plist/).*** + * + * Once complete, you'll need to call [BasicAds.initialize] in your `commonMain` before calling for ads. + * + * ***NOTE: You do not need to initialize within each platform.*** + * @throws ClassNotFoundException + */ +@RequiresOptIn(message = "Depends on Google Mobile Ads library for Android and iOS") +@Retention(AnnotationRetention.BINARY) +@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY) +public annotation class DependsOnGoogleMobileAds() \ No newline at end of file diff --git a/basic-ads/src/commonMain/kotlin/app/lexilabs/basic/ads/ExperimentalBasicAds.kt b/basic-ads/src/commonMain/kotlin/app/lexilabs/basic/ads/ExperimentalBasicAds.kt new file mode 100644 index 0000000..14cf856 --- /dev/null +++ b/basic-ads/src/commonMain/kotlin/app/lexilabs/basic/ads/ExperimentalBasicAds.kt @@ -0,0 +1,11 @@ +package app.lexilabs.basic.ads + +/** + * This API is not considered 'production' until reaching version 1.0.0 or higher + */ +@RequiresOptIn(message = "This API is experimental, unstable, and will definitely change.") +@Retention(AnnotationRetention.BINARY) +@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY) +public annotation class ExperimentalBasicAds() + + diff --git a/basic-ads/src/commonMain/kotlin/app/lexilabs/basic/ads/RequestConfiguration.kt b/basic-ads/src/commonMain/kotlin/app/lexilabs/basic/ads/RequestConfiguration.kt new file mode 100644 index 0000000..6d4f619 --- /dev/null +++ b/basic-ads/src/commonMain/kotlin/app/lexilabs/basic/ads/RequestConfiguration.kt @@ -0,0 +1,47 @@ +package app.lexilabs.basic.ads + +/** + * Sets the initial configuration of your AdMob instance for Android and iOS + * @param maxAdContentRating The maximum content rating of the ads you wish to display + * @param publisherPrivacyPersonalizationState The privacy level of the ads + * @param tagForChildDirectedTreatment Should ads be appropriate for children + * @param tagForUnderAgeOfConsent Should ads be limited to content for children under the age of consent + * @param testDeviceIds A [List] of id [String] for testing devices + * @see BasicAds.initialize + * @see BasicAds.configuration + * @see DependsOnGoogleMobileAds + */ +@DependsOnGoogleMobileAds +public data class RequestConfiguration( + val maxAdContentRating: String?, + val publisherPrivacyPersonalizationState: PublisherPrivacyPersonalizationState, + val tagForChildDirectedTreatment: Int, + val tagForUnderAgeOfConsent: Int, + val testDeviceIds: List? +){ + public enum class PublisherPrivacyPersonalizationState(private val value: Int) { + DEFAULT(0), + ENABLED(1), + DISABLED(2); + + public companion object { + public fun fromInt(value: Int): PublisherPrivacyPersonalizationState = + PublisherPrivacyPersonalizationState.entries.find { it.value == value } ?: DEFAULT + } + } + + public companion object { + public const val TAG_FOR_CHILD_DIRECTED_TREATMENT_UNSPECIFIED: Int = -1 + public const val TAG_FOR_CHILD_DIRECTED_TREATMENT_FALSE: Int = 0 + public const val TAG_FOR_CHILD_DIRECTED_TREATMENT_TRUE: Int = 1 + public const val TAG_FOR_UNDER_AGE_OF_CONSENT_TRUE: Int = 1 + public const val TAG_FOR_UNDER_AGE_OF_CONSENT_FALSE: Int = 0 + public const val TAG_FOR_UNDER_AGE_OF_CONSENT_UNSPECIFIED: Int = -1 + public const val MAX_AD_CONTENT_RATING_UNSPECIFIED: String = "" + public const val MAX_AD_CONTENT_RATING_G: String = "G" + public const val MAX_AD_CONTENT_RATING_PG: String = "PG" + public const val MAX_AD_CONTENT_RATING_T: String = "T" + public const val MAX_AD_CONTENT_RATING_MA: String = "MA" + + } +} \ No newline at end of file diff --git a/basic-ads/src/iosMain/kotlin/app/lexilabs/basic/ads/AdError.kt b/basic-ads/src/iosMain/kotlin/app/lexilabs/basic/ads/AdError.kt new file mode 100644 index 0000000..ea962bb --- /dev/null +++ b/basic-ads/src/iosMain/kotlin/app/lexilabs/basic/ads/AdError.kt @@ -0,0 +1,3 @@ +package app.lexilabs.basic.ads + +public actual open class AdError: Error() \ No newline at end of file diff --git a/basic-ads/src/iosMain/kotlin/app/lexilabs/basic/ads/AdLoader.kt b/basic-ads/src/iosMain/kotlin/app/lexilabs/basic/ads/AdLoader.kt new file mode 100644 index 0000000..39fd05a --- /dev/null +++ b/basic-ads/src/iosMain/kotlin/app/lexilabs/basic/ads/AdLoader.kt @@ -0,0 +1,261 @@ +package app.lexilabs.basic.ads + +import app.lexilabs.basic.logging.Log +import cocoapods.Google_Mobile_Ads_SDK.GADFullScreenContentDelegateProtocol +import cocoapods.Google_Mobile_Ads_SDK.GADFullScreenPresentingAdProtocol +import cocoapods.Google_Mobile_Ads_SDK.GADInterstitialAd +import cocoapods.Google_Mobile_Ads_SDK.GADInterstitialAdLoadCompletionHandler +import cocoapods.Google_Mobile_Ads_SDK.GADRequest +import cocoapods.Google_Mobile_Ads_SDK.GADRewardedAd +import cocoapods.Google_Mobile_Ads_SDK.GADRewardedAdLoadCompletionHandler +import cocoapods.Google_Mobile_Ads_SDK.GADRewardedInterstitialAd +import cocoapods.Google_Mobile_Ads_SDK.GADRewardedInterstitialAdLoadCompletionHandler +import cocoapods.Google_Mobile_Ads_SDK.GADUserDidEarnRewardHandler +import kotlinx.cinterop.ExperimentalForeignApi +import platform.Foundation.NSError +import platform.UIKit.UIApplication +import platform.darwin.NSObject + +@OptIn(ExperimentalForeignApi::class) +public actual typealias AdRequest = GADRequest + +@OptIn(ExperimentalForeignApi::class) +public actual class AdLoader { + + private val tag = "AdLoader" + + private var interstitialAd: GADInterstitialAd? = null + private var interstitialAdId: String = "" + + private var rewardedInterstitialAd: GADRewardedInterstitialAd? = null + private var rewardedInterstitialAdId: String = "" + + private var rewardedAd: GADRewardedAd? = null + private var rewardedAdId: String = "" + + public actual fun requestAd(): AdRequest = GADRequest() + + public actual fun loadInterstitialAd( + activity: Any?, /* This variable is unused, but necessary for Android */ + adUnitId: String, + onLoaded: () -> Unit + ) { + interstitialAdId = adUnitId + GADInterstitialAd.loadWithAdUnitID( + adUnitID = interstitialAdId, + request = requestAd(), + completionHandler = object : GADInterstitialAdLoadCompletionHandler { + override fun invoke(p1: GADInterstitialAd?, p2: NSError?) { + p1?.let { + Log.d(tag, "loadInterstitialAd:success") + interstitialAd = it + onLoaded() + } + p2?.let { Log.e(tag, "loadInterstitialAd:failure:$it") } + } + } + ) + } + + public actual fun showInterstitialAd( + activity: Any?, /* This variable is unused, but necessary for Android */ + onDismissed: () -> Unit + ){ + val viewController = UIApplication.sharedApplication.keyWindow?.rootViewController + checkNotNull(viewController) { "Root ViewController is null" } + + interstitialAd?.let { + interstitialAd?.fullScreenContentDelegate = object: NSObject(), GADFullScreenContentDelegateProtocol{ + override fun ad( + ad: GADFullScreenPresentingAdProtocol, + didFailToPresentFullScreenContentWithError: NSError + ) { + // super.ad(ad, didFailToPresentFullScreenContentWithError) + Log.d(tag, "showInterstitialAd:ad called") + } + + override fun adDidDismissFullScreenContent(ad: GADFullScreenPresentingAdProtocol) { + // super.adDidDismissFullScreenContent(ad) + Log.d(tag, "showInterstitialAd:dismissed") + interstitialAd = null + onDismissed() + } + + override fun adDidRecordClick(ad: GADFullScreenPresentingAdProtocol) { + // super.adDidRecordClick(ad) + Log.d(tag, "showInterstitialAd:recorded click") + } + + override fun adDidRecordImpression(ad: GADFullScreenPresentingAdProtocol) { + // super.adDidRecordImpression(ad) + Log.d(tag, "showInterstitialAd:recorded impression") + + } + + override fun adWillDismissFullScreenContent(ad: GADFullScreenPresentingAdProtocol) { + // super.adWillDismissFullScreenContent(ad) + Log.d(tag, "showInterstitialAd:will dismiss") + } + + override fun adWillPresentFullScreenContent(ad: GADFullScreenPresentingAdProtocol) { + // super.adWillPresentFullScreenContent(ad) + Log.d(tag, "showInterstitialAd:will present content") + } + } + interstitialAd?.presentFromRootViewController(viewController) + } ?: Log.d(tag, "The interstitial ad wasn't ready yet.") + } + + public actual fun loadRewardedInterstitialAd( + activity: Any?, /* This variable is unused, but necessary for Android */ + adUnitId: String, + onLoaded: () -> Unit + ) { + rewardedInterstitialAdId = adUnitId + GADRewardedInterstitialAd.loadWithAdUnitID( + adUnitID = rewardedInterstitialAdId, + request = requestAd(), + completionHandler = object : GADRewardedInterstitialAdLoadCompletionHandler { + override fun invoke(p1: GADRewardedInterstitialAd?, p2: NSError?) { + p1?.let { + Log.d(tag, "loadRewardedInterstitialAd:success") + rewardedInterstitialAd = it + onLoaded() + } + p2?.let { Log.e(tag, "loadRewardedInterstitialAd:failure:$it") } + } + } + ) + } + + public actual fun showRewardedInterstitialAd(activity: Any?, onDismissed: () -> Unit, onRewardEarned: () -> Unit) { + val viewController = UIApplication.sharedApplication.keyWindow?.rootViewController + checkNotNull(viewController) { "Root ViewController is null" } + + rewardedInterstitialAd?.let { + rewardedInterstitialAd?.fullScreenContentDelegate = object: NSObject(), GADFullScreenContentDelegateProtocol{ + override fun ad( + ad: GADFullScreenPresentingAdProtocol, + didFailToPresentFullScreenContentWithError: NSError + ) { + // super.ad(ad, didFailToPresentFullScreenContentWithError) + Log.d(tag, "showRewardedInterstitialAd:ad called") + } + + override fun adDidDismissFullScreenContent(ad: GADFullScreenPresentingAdProtocol) { + // super.adDidDismissFullScreenContent(ad) + Log.d(tag, "showRewardedInterstitialAd:dismissed") + rewardedInterstitialAd = null + onDismissed() + } + + override fun adDidRecordClick(ad: GADFullScreenPresentingAdProtocol) { + // super.adDidRecordClick(ad) + Log.d(tag, "showRewardedInterstitialAd:recorded click") + } + + override fun adDidRecordImpression(ad: GADFullScreenPresentingAdProtocol) { + // super.adDidRecordImpression(ad) + Log.d(tag, "showRewardedInterstitialAd:recorded impression") + + } + + override fun adWillDismissFullScreenContent(ad: GADFullScreenPresentingAdProtocol) { + // super.adWillDismissFullScreenContent(ad) + Log.d(tag, "showRewardedInterstitialAd:will dismiss") + } + + override fun adWillPresentFullScreenContent(ad: GADFullScreenPresentingAdProtocol) { + // super.adWillPresentFullScreenContent(ad) + Log.d(tag, "showRewardedInterstitialAd:will present content") + } + } + rewardedInterstitialAd?.presentFromRootViewController( + viewController = viewController, + userDidEarnRewardHandler = object: GADUserDidEarnRewardHandler{ + override fun invoke() { + onRewardEarned() + } + + } + ) + } ?: Log.d(tag, "The interstitial ad wasn't ready yet.") + } + + public actual fun loadRewardedAd( + activity: Any?, /* This variable is unused, but necessary for Android */ + adUnitId: String, + onLoaded: () -> Unit + ) { + rewardedAdId = adUnitId + GADRewardedAd.loadWithAdUnitID( + adUnitID = rewardedAdId, + request = requestAd(), + completionHandler = object : GADRewardedAdLoadCompletionHandler { + override fun invoke(p1: GADRewardedAd?, p2: NSError?) { + p1?.let { + Log.d(tag, "loadRewardedAd:success") + rewardedAd = it + onLoaded() + } + p2?.let { Log.e(tag, "loadRewardedAd:failure:$it") } + } + } + ) + } + + public actual fun showRewardedAd(activity: Any?, onDismissed: () -> Unit, onRewardEarned: () -> Unit) { + val viewController = UIApplication.sharedApplication.keyWindow?.rootViewController + checkNotNull(viewController) { "Root ViewController is null" } + + rewardedAd?.let { + rewardedAd?.fullScreenContentDelegate = object: NSObject(), GADFullScreenContentDelegateProtocol{ + override fun ad( + ad: GADFullScreenPresentingAdProtocol, + didFailToPresentFullScreenContentWithError: NSError + ) { + // super.ad(ad, didFailToPresentFullScreenContentWithError) + Log.d(tag, "showRewardedAd:ad called") + } + + override fun adDidDismissFullScreenContent(ad: GADFullScreenPresentingAdProtocol) { + // super.adDidDismissFullScreenContent(ad) + Log.d(tag, "showRewardedAd:dismissed") + rewardedAd = null + onDismissed() + } + + override fun adDidRecordClick(ad: GADFullScreenPresentingAdProtocol) { + // super.adDidRecordClick(ad) + Log.d(tag, "showRewardedAd:recorded click") + } + + override fun adDidRecordImpression(ad: GADFullScreenPresentingAdProtocol) { + // super.adDidRecordImpression(ad) + Log.d(tag, "showRewardedAd:recorded impression") + + } + + override fun adWillDismissFullScreenContent(ad: GADFullScreenPresentingAdProtocol) { + // super.adWillDismissFullScreenContent(ad) + Log.d(tag, "showRewardedAd:will dismiss") + } + + override fun adWillPresentFullScreenContent(ad: GADFullScreenPresentingAdProtocol) { + // super.adWillPresentFullScreenContent(ad) + Log.d(tag, "showRewardedAd:will present content") + } + } + rewardedAd?.presentFromRootViewController( + rootViewController = viewController, + userDidEarnRewardHandler = object: GADUserDidEarnRewardHandler{ + override fun invoke() { + onRewardEarned() + } + + } + ) + } ?: Log.d(tag, "The interstitial ad wasn't ready yet.") + } + +} \ No newline at end of file diff --git a/basic-ads/src/iosMain/kotlin/app/lexilabs/basic/ads/AdSize.kt b/basic-ads/src/iosMain/kotlin/app/lexilabs/basic/ads/AdSize.kt new file mode 100644 index 0000000..f9124a1 --- /dev/null +++ b/basic-ads/src/iosMain/kotlin/app/lexilabs/basic/ads/AdSize.kt @@ -0,0 +1,73 @@ +package app.lexilabs.basic.ads + +import cocoapods.Google_Mobile_Ads_SDK.GADAdSize +import cocoapods.Google_Mobile_Ads_SDK.GADAdSizeBanner +import cocoapods.Google_Mobile_Ads_SDK.GADAdSizeFluid +import cocoapods.Google_Mobile_Ads_SDK.GADAdSizeFullBanner +import cocoapods.Google_Mobile_Ads_SDK.GADAdSizeInvalid +import cocoapods.Google_Mobile_Ads_SDK.GADAdSizeLargeBanner +import cocoapods.Google_Mobile_Ads_SDK.GADAdSizeLeaderboard +import cocoapods.Google_Mobile_Ads_SDK.GADAdSizeMediumRectangle +import cocoapods.Google_Mobile_Ads_SDK.GADAdSizeSkyscraper +import kotlinx.cinterop.CValue +import kotlinx.cinterop.ExperimentalForeignApi +import platform.CoreGraphics.CGRect +import platform.CoreGraphics.CGRectMake + +@OptIn(ExperimentalForeignApi::class) +public actual class AdSize actual constructor(public actual val width: Int, public actual val height: Int) { + + public actual companion object { + public actual val FULL_WIDTH: Int get() = -1 // Value from Android implementation + public actual val AUTO_HEIGHT: Int get() = -2 // Value from Android implementation + public actual val BANNER: AdSize get() = GADAdSizeBanner.toCommon() + public actual val FULL_BANNER: AdSize get() = GADAdSizeFullBanner.toCommon() + public actual val LARGE_BANNER: AdSize get() = GADAdSizeLargeBanner.toCommon() + public actual val LEADERBOARD: AdSize get() = GADAdSizeLeaderboard.toCommon() + public actual val MEDIUM_RECTANGLE: AdSize get() = GADAdSizeMediumRectangle.toCommon() + public actual val WIDE_SKYSCRAPER: AdSize get() = GADAdSizeSkyscraper.toCommon() + public actual val FLUID: AdSize get() = GADAdSizeFluid.toCommon() + public actual val INVALID: AdSize get() = GADAdSizeInvalid.toCommon() + public actual val SEARCH: AdSize get() = GADAdSizeFluid.toCommon() + } + public fun toIos(): GADAdSize { + return when(this) { + BANNER -> GADAdSizeBanner + FULL_BANNER -> GADAdSizeFullBanner + LARGE_BANNER -> GADAdSizeLargeBanner + LEADERBOARD -> GADAdSizeLeaderboard + MEDIUM_RECTANGLE -> GADAdSizeMediumRectangle + WIDE_SKYSCRAPER -> GADAdSizeSkyscraper + FLUID -> GADAdSizeFluid + INVALID -> GADAdSizeInvalid + else -> GADAdSizeFluid + } + } +} + +@OptIn(ExperimentalForeignApi::class) +public fun GADAdSize.toCommon(): AdSize = + AdSize( + width = this.size.width.toInt(), + height = this.size.height.toInt() + ) + +@OptIn(ExperimentalForeignApi::class) +public fun GADAdSize.toCGRectCValue(): CValue { + return CGRectMake( + x = 0.0, + y = 0.0, + width = this.size.width, + height = this.size.height + ) +} + +@OptIn(ExperimentalForeignApi::class) +public fun AdSize.toCGRectCValue(): CValue { + return CGRectMake( + x = 0.0, + y = 0.0, + width = this.width.toDouble(), + height = this.height.toDouble() + ) +} \ No newline at end of file diff --git a/basic-ads/src/iosMain/kotlin/app/lexilabs/basic/ads/AdUnitId.kt b/basic-ads/src/iosMain/kotlin/app/lexilabs/basic/ads/AdUnitId.kt new file mode 100644 index 0000000..be259f8 --- /dev/null +++ b/basic-ads/src/iosMain/kotlin/app/lexilabs/basic/ads/AdUnitId.kt @@ -0,0 +1,12 @@ +package app.lexilabs.basic.ads + +public actual object AdUnitId { + public actual fun autoSelect(androidAdUnitId: String?, iosAdUnitId: String?): String { + return iosAdUnitId ?: "" + } + + public actual const val BANNER_DEFAULT: String = "ca-app-pub-3940256099942544/2435281174" + public actual const val INTERSTITIAL_DEFAULT: String = "ca-app-pub-3940256099942544/4411468910" + public actual const val REWARDED_INTERSTITIAL_DEFAULT: String = "ca-app-pub-3940256099942544/6978759866" + public actual const val REWARDED_DEFAULT: String = "ca-app-pub-3940256099942544/1712485313" +} \ No newline at end of file diff --git a/basic-ads/src/iosMain/kotlin/app/lexilabs/basic/ads/BasicAds.kt b/basic-ads/src/iosMain/kotlin/app/lexilabs/basic/ads/BasicAds.kt new file mode 100644 index 0000000..0a070ec --- /dev/null +++ b/basic-ads/src/iosMain/kotlin/app/lexilabs/basic/ads/BasicAds.kt @@ -0,0 +1,91 @@ +package app.lexilabs.basic.ads + +import androidx.annotation.MainThread +import cocoapods.Google_Mobile_Ads_SDK.GADErrorDomain +import cocoapods.Google_Mobile_Ads_SDK.GADMobileAds +import cocoapods.Google_Mobile_Ads_SDK.GADPublisherPrivacyPersonalizationState +import cocoapods.Google_Mobile_Ads_SDK.GADRequestConfiguration +import cocoapods.Google_Mobile_Ads_SDK.GADVersionNumber +import kotlinx.cinterop.ExperimentalForeignApi +import kotlinx.cinterop.useContents +import platform.Foundation.NSNumber + +//@OptIn(ExperimentalForeignApi::class) +//public actual typealias InitializationStatus = GADInitializationStatus +@OptIn(ExperimentalForeignApi::class) +public actual object BasicAds { + + public actual val errorDomain: String + get() = GADErrorDomain + + @DependsOnGoogleMobileAds + public actual var configuration: RequestConfiguration + get() = GADMobileAds.sharedInstance().requestConfiguration().toCommon() + set(config) { config.setConfigurationForIos() } + + public actual val version: String = GADMobileAds.sharedInstance().versionNumber.useContents { + "$majorVersion.$minorVersion.$patchVersion" + } + + public actual val initialized: Boolean = + GADMobileAds.sharedInstance().initializationStatus.adapterStatusesByClassName.isNotEmpty() + + @MainThread + public actual fun initialize(context: Any?) { + GADMobileAds.sharedInstance().startWithCompletionHandler(null) + } + +// @OptIn(ExperimentalForeignApi::class) +// public actual fun getInitializationStatus(): InitializationStatus? = +// GADMobileAds.sharedInstance().initializationStatus + + @OptIn(ExperimentalForeignApi::class) + public actual fun disableMediationAdapterInitialization(context: Any?) { + GADMobileAds.sharedInstance().disableMediationInitialization() + } + + public actual fun openDebugMenu(context: Any?, adUnitId: String) { + // DO NOTHING. This doesn't exist in iOS + } + + @OptIn(ExperimentalForeignApi::class) + public actual fun setAppMuted(muted: Boolean) { + GADMobileAds.sharedInstance().setApplicationMuted(muted) + } + + @OptIn(ExperimentalForeignApi::class) + public actual fun setAppVolume(volume: Float) { + GADMobileAds.sharedInstance().setApplicationVolume(volume) + } +} + +@DependsOnGoogleMobileAds +@OptIn(ExperimentalForeignApi::class) +private fun RequestConfiguration.setConfigurationForIos() { + GADMobileAds.sharedInstance().requestConfiguration.let { + it.setMaxAdContentRating(this.maxAdContentRating) + it.setPublisherPrivacyPersonalizationState(this.publisherPrivacyPersonalizationState.toIos()) + it.setTagForUnderAgeOfConsent(NSNumber(this.tagForUnderAgeOfConsent)) + it.setTagForChildDirectedTreatment(NSNumber(this.tagForChildDirectedTreatment)) + it.setTestDeviceIdentifiers(this.testDeviceIds) + } +} + +@DependsOnGoogleMobileAds +@OptIn(ExperimentalForeignApi::class) +private fun GADRequestConfiguration.toCommon(): RequestConfiguration = + RequestConfiguration( + maxAdContentRating = this.maxAdContentRating, + publisherPrivacyPersonalizationState = this.publisherPrivacyPersonalizationState.toCommon(), + tagForChildDirectedTreatment = this.tagForChildDirectedTreatment?.intValue ?: 0, + tagForUnderAgeOfConsent = this.tagForUnderAgeOfConsent?.intValue ?: 0, + testDeviceIds = this.testDeviceIdentifiers?.map { it.toString() } + ) + +@DependsOnGoogleMobileAds +private fun RequestConfiguration.PublisherPrivacyPersonalizationState.toIos(): GADPublisherPrivacyPersonalizationState = + this.ordinal.toLong() + +@DependsOnGoogleMobileAds +private fun GADPublisherPrivacyPersonalizationState.toCommon(): RequestConfiguration.PublisherPrivacyPersonalizationState = + RequestConfiguration.PublisherPrivacyPersonalizationState.fromInt(this.toInt()) diff --git a/basic-ads/src/iosMain/kotlin/app/lexilabs/basic/ads/Composables.kt b/basic-ads/src/iosMain/kotlin/app/lexilabs/basic/ads/Composables.kt new file mode 100644 index 0000000..171b785 --- /dev/null +++ b/basic-ads/src/iosMain/kotlin/app/lexilabs/basic/ads/Composables.kt @@ -0,0 +1,73 @@ +package app.lexilabs.basic.ads + +import androidx.compose.foundation.layout.size +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.unit.dp +import androidx.compose.ui.viewinterop.UIKitView +import cocoapods.Google_Mobile_Ads_SDK.GADBannerView +import kotlinx.cinterop.ExperimentalForeignApi +import platform.UIKit.UIApplication + +@OptIn(ExperimentalForeignApi::class) +@Composable +public actual fun BannerAd(adUnitId: String, adSize: AdSize) { + UIKitView( + factory = { + val viewController = UIApplication.sharedApplication.keyWindow?.rootViewController + checkNotNull(viewController) { "Root ViewController is null" } + + val bannerView = GADBannerView(adSize.toCGRectCValue()).apply { + adUnitID = adUnitId + this.rootViewController = viewController + loadRequest(AdLoader().requestAd()) + } + bannerView + }, + modifier = Modifier.size(width = adSize.width.dp, height = adSize.height.dp) + ) +} + +@Composable +public actual fun InterstitialAd(activity: Any?, adUnitId: String, onDismissed: () -> Unit) { + val adLoader = AdLoader() + adLoader.loadInterstitialAd( + activity, + adUnitId, + onLoaded = { + adLoader.showInterstitialAd(activity) { onDismissed() } + } + ) +} + +@Composable +public actual fun RewardedAd(activity: Any?, adUnitId: String, onDismissed: () -> Unit, onRewardEarned: () -> Unit) { + val adLoader = AdLoader() + adLoader.loadRewardedAd( + activity = activity, + adUnitId = adUnitId, + onLoaded = { + adLoader.showRewardedAd( + activity = activity, + onDismissed = { onDismissed() }, + onRewardEarned = { onRewardEarned() } + ) + } + ) +} + +@Composable +public actual fun RewardedInterstitialAd(activity: Any?, adUnitId: String, onDismissed: () -> Unit, onRewardEarned: () -> Unit) { + val adLoader = AdLoader() + adLoader.loadRewardedInterstitialAd( + activity = activity, + adUnitId = adUnitId, + onLoaded = { + adLoader.showRewardedInterstitialAd( + activity = activity, + onDismissed = { onDismissed() }, + onRewardEarned = { onRewardEarned() } + ) + } + ) +} diff --git a/basic-logging/src/appleMain/kotlin/app/lexilabs/basic/logging/Log.apple.kt b/basic-logging/src/appleMain/kotlin/app/lexilabs/basic/logging/Log.apple.kt index 9385a22..263cc9e 100644 --- a/basic-logging/src/appleMain/kotlin/app/lexilabs/basic/logging/Log.apple.kt +++ b/basic-logging/src/appleMain/kotlin/app/lexilabs/basic/logging/Log.apple.kt @@ -4,25 +4,25 @@ import platform.Foundation.NSLog public actual object Log : Logger { actual override fun v(tag: String, message: String) { - NSLog("VERBOSE: [$tag] $message") + NSLog("[$tag] VERBOSE: $message") } actual override fun d(tag: String, message: String) { - NSLog("DEBUG: [$tag] $message") + NSLog("[$tag] DEBUG: $message") } actual override fun i(tag: String, message: String) { - NSLog("INFO: [$tag] $message") + NSLog("[$tag] INFO: $message") } actual override fun w(tag: String, message: String) { - NSLog("WARN: [$tag] $message") + NSLog("[$tag] WARN: $message") } actual override fun e(tag: String, message: String) { - NSLog("ERROR: [$tag] $message") + NSLog("[$tag] ERROR: $message") } actual override fun wtf(tag: String, message: String) { - NSLog("WHAT-THE-F***: [$tag] $message") + NSLog("[$tag] WHAT-THE-F***: $message") } } \ No newline at end of file diff --git a/basic-sound/README.md b/basic-sound/README.md index 831d5c6..ab53647 100644 --- a/basic-sound/README.md +++ b/basic-sound/README.md @@ -50,7 +50,7 @@ sourceSets { } ``` -## Usage +## `Audio()` Usage You can initialize an `Audio` object with a URL ```kotlin val resource = "https://dare.wisc.edu/wp-content/uploads/sites/1051/2008/11/MS072.mp3" @@ -81,9 +81,10 @@ audio.release() // converts the audio instance to null ``` There are lots of options to load larger files asynchronously: + ```kotlin // Create empty Audio instance -val audio = Audio() +val audio: Audio = Audio() audio.resource = "https://dare.wisc.edu/wp-content/uploads/sites/1051/2008/11/MS072.mp3" // Begin collecting the state of audio val audioState by audioPlayer.audioState.collectAsState() @@ -104,7 +105,9 @@ Button( is AudioState.ERROR -> println((audioState as AudioState.ERROR).message) is AudioState.PAUSED -> audioPlayer.play() is AudioState.PLAYING -> audioPlayer.pause() - else -> { /** DO NOTHING **/ } + else -> { + /** DO NOTHING **/ + } } } ) { @@ -115,6 +118,32 @@ Button( is AudioState.READY -> Text("Ready") is AudioState.PAUSED -> Text("Paused") is AudioState.PLAYING -> Text("Playing") + else -> { Text("Error") } } } ``` +## `AudioByte` Usage +AudioByte allows you to load audio to memory to play multiple times later without reloading -- sort of like a soundboard. +You could make a callable class that is passed throughout the app so the sounds could be access in any context. +If you need help creating a platformContext, [you're welcome to steal my method.]("https://medium.com/@robert.jamison/passing-android-context-in-kmp-jetpack-compose-8de5b5de7bdd") +```kotlin +// Your custom class built in commonMain +class SoundBoard(platformContext: Any) { + // + private val audioByte: AudioByte = AudioByte() + private val click: Any = audioByte.load(platformContext, Res.getUri("files/click.mp3")) + private val fanfare: Any = audioByte.load(platformContext, Res.getUri("files/fanfare.mp3")) + + fun click() = audioByte.play(click) + fun fanfare() = audioByte.play(solveId) + fun release() = audioByte.release() +} + +// create your class later +val soundBoard = SoundBoard(myPlatformContext) +// generate the sound whenever you like after +soundBoard.click() +// remember to release when you won't need the soundboard anymore. +// If you use the sound everywhere, you won't need to do this +soundBoard.release() +``` \ No newline at end of file diff --git a/basic-sound/src/androidMain/kotlin/app/lexilabs/basic/sound/AudioByte.android.kt b/basic-sound/src/androidMain/kotlin/app/lexilabs/basic/sound/AudioByte.android.kt new file mode 100644 index 0000000..69dff0b --- /dev/null +++ b/basic-sound/src/androidMain/kotlin/app/lexilabs/basic/sound/AudioByte.android.kt @@ -0,0 +1,39 @@ +package app.lexilabs.basic.sound + +import android.content.Context +import android.media.AudioAttributes +import android.media.SoundPool +import android.util.Log + +public actual class AudioByte actual constructor() : AudioByteBuilder { + private val soundPool: SoundPool + private var audioIdHolder: Int = 0 + + init { + val audioAttributes = AudioAttributes.Builder() + .setUsage(AudioAttributes.USAGE_GAME) + .setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION) + .build() + + soundPool = SoundPool.Builder() + .setMaxStreams(4) + .setAudioAttributes(audioAttributes) + .build() + } + + public actual override fun load(context: Any, localPath: String): Any { + Log.i("AudioByte", localPath) + val path = localPath.removePrefix("file:///android_asset/") + val fd = (context as Context).assets.openFd(path) + audioIdHolder = soundPool.load(fd, 1) + return audioIdHolder + } + + public actual override fun play(item: Any) { + soundPool.play(item as Int, 1f, 1f, 1, 0, 1f) + } + + public actual override fun release() { + soundPool.release() + } +} \ No newline at end of file diff --git a/basic-sound/src/appleMain/kotlin/app/lexilabs/basic/sound/AudioByte.apple.kt b/basic-sound/src/appleMain/kotlin/app/lexilabs/basic/sound/AudioByte.apple.kt new file mode 100644 index 0000000..b1e9bf0 --- /dev/null +++ b/basic-sound/src/appleMain/kotlin/app/lexilabs/basic/sound/AudioByte.apple.kt @@ -0,0 +1,48 @@ +package app.lexilabs.basic.sound + +import app.lexilabs.basic.logging.Log +import kotlinx.cinterop.ExperimentalForeignApi +import kotlinx.cinterop.UnsafeNumber +import platform.AVFAudio.AVAudioEngine +import platform.AVFAudio.AVAudioFile +import platform.AVFAudio.AVAudioMixerNode +import platform.AVFAudio.AVAudioNodeBus +import platform.AVFAudio.AVAudioPlayerNode +import platform.Foundation.NSURL + +@OptIn(ExperimentalForeignApi::class) +public actual class AudioByte actual constructor() : AudioByteBuilder { + private val engine: AVAudioEngine = AVAudioEngine() + private val mixer: AVAudioMixerNode = engine.mainMixerNode + private val tag = "AudioByte" + + init { + engine.startAndReturnError(null) + } + + public actual override fun load(context: Any, localPath: String): Any { + val pathUrl = NSURL(string = localPath) + return AVAudioFile(pathUrl, null) + } + + @OptIn(UnsafeNumber::class) + actual override fun play(item: Any) { + val playerNode = AVAudioPlayerNode() + engine.attachNode(playerNode) + engine.connect(playerNode, mixer, mixer.outputFormatForBus(AVAudioNodeBus.MIN_VALUE)) + playerNode.scheduleFile( + file = item as AVAudioFile, + atTime = null, + null +// completionHandler = { +// this.engine.detachNode(playerNode) +// } + ) + playerNode.play() + Log.d(tag, "play: playing") + } + + actual override fun release() { + engine.stop() + } +} \ No newline at end of file diff --git a/basic-sound/src/commonMain/kotlin/app/lexilabs/basic/sound/Audio.kt b/basic-sound/src/commonMain/kotlin/app/lexilabs/basic/sound/Audio.kt index 37664d8..d65ac33 100644 --- a/basic-sound/src/commonMain/kotlin/app/lexilabs/basic/sound/Audio.kt +++ b/basic-sound/src/commonMain/kotlin/app/lexilabs/basic/sound/Audio.kt @@ -1,5 +1,4 @@ @file:Suppress("ConvertSecondaryConstructorToPrimary") -// TODO: need to add the constructor for filepath in later versions package app.lexilabs.basic.sound diff --git a/basic-sound/src/commonMain/kotlin/app/lexilabs/basic/sound/AudioByte.kt b/basic-sound/src/commonMain/kotlin/app/lexilabs/basic/sound/AudioByte.kt new file mode 100644 index 0000000..c2f627a --- /dev/null +++ b/basic-sound/src/commonMain/kotlin/app/lexilabs/basic/sound/AudioByte.kt @@ -0,0 +1,51 @@ +package app.lexilabs.basic.sound + +/** + * Play audio from a local file path or a Compose Resource ([String]). + * + * Example: + * ``` + * val audioByte: AudioByte = AudioByte() // Create an AudioByte instance + * val clickSound: Any = audioByte.load(Res.getUri("files/click.mp3")) // Load the audio file into memory + * audioByte.play(clickSound) // Call it whenever you like as needed + * ``` + */ +public expect class AudioByte(): AudioByteBuilder { + /** + * Used to load an [Audio] file into memory. + * + * @param context provide the Platform Context (this is mostly to accommodate Android) + * @param localPath provide the path and filename for the audio file as a [String] + * + * Example: + * ``` + * val audioByte: AudioByte = AudioByte() // Create an AudioByte instance + * val clickSound: Any = audioByte.load(Res.getUri("files/click.mp3")) // Load the audio file into memory + * ``` + */ + override fun load(context: Any, localPath: String): Any + /** + * Play a loaded sound immediately, without regard for how many times it's already played + * + * @param item provide the result of the [load] function called previously + * + * Example: + * ``` + * val audioByte: AudioByte = AudioByte() // Create an AudioByte instance + * val clickSound: Any = audioByte.load(Res.getUri("files/click.mp3")) // Load the audio file into memory + * audioByte.play(clickSound) // Call it whenever you like as needed + * ``` + */ + override fun play(item: Any) + /** + * Used when done to clear the [AudioByte] object from memory. + ** + * Example: + * ``` + * val audioByte: AudioByte = AudioByte() // Create an AudioByte instance + * val clickSound: Any = audioByte.load(Res.getUri("files/click.mp3")) // Load the audio file into memory + * audioByte.release() // audio can no longer be called + * ``` + */ + override fun release() +} \ No newline at end of file diff --git a/basic-sound/src/commonMain/kotlin/app/lexilabs/basic/sound/AudioByteBuilder.kt b/basic-sound/src/commonMain/kotlin/app/lexilabs/basic/sound/AudioByteBuilder.kt new file mode 100644 index 0000000..aa581e6 --- /dev/null +++ b/basic-sound/src/commonMain/kotlin/app/lexilabs/basic/sound/AudioByteBuilder.kt @@ -0,0 +1,7 @@ +package app.lexilabs.basic.sound + +public interface AudioByteBuilder { + public fun load(context: Any, localPath: String): Any + public fun play(item: Any) + public fun release() +} \ No newline at end of file diff --git a/basic-sound/src/jsMain/kotlin/app/lexilabs/basic/sound/AudioByte.js.kt b/basic-sound/src/jsMain/kotlin/app/lexilabs/basic/sound/AudioByte.js.kt new file mode 100644 index 0000000..0cef0ed --- /dev/null +++ b/basic-sound/src/jsMain/kotlin/app/lexilabs/basic/sound/AudioByte.js.kt @@ -0,0 +1,27 @@ +package app.lexilabs.basic.sound + +import app.lexilabs.basic.logging.Log +import org.w3c.dom.Audio + +public actual class AudioByte actual constructor() : AudioByteBuilder { + private var audioPlayer: Audio = Audio() + + public actual override fun load(context: Any, localPath: String): Any { + Log.i("AudioByte", localPath) + audioPlayer = Audio(localPath) + audioPlayer.load() + return audioPlayer + } + + public actual override fun play(item: Any) { + Log.i("AudioByte", "playing") + (item as Audio).play() + } + + public actual override fun release() { + Log.i("AudioByte", "release") + audioPlayer.pause() + audioPlayer.src = "" + audioPlayer.load() + } +} \ No newline at end of file diff --git a/basic-sound/src/wasmJsMain/kotlin/app/lexilabs/basic/sound/AudioByte.wasmJs.kt b/basic-sound/src/wasmJsMain/kotlin/app/lexilabs/basic/sound/AudioByte.wasmJs.kt new file mode 100644 index 0000000..0cef0ed --- /dev/null +++ b/basic-sound/src/wasmJsMain/kotlin/app/lexilabs/basic/sound/AudioByte.wasmJs.kt @@ -0,0 +1,27 @@ +package app.lexilabs.basic.sound + +import app.lexilabs.basic.logging.Log +import org.w3c.dom.Audio + +public actual class AudioByte actual constructor() : AudioByteBuilder { + private var audioPlayer: Audio = Audio() + + public actual override fun load(context: Any, localPath: String): Any { + Log.i("AudioByte", localPath) + audioPlayer = Audio(localPath) + audioPlayer.load() + return audioPlayer + } + + public actual override fun play(item: Any) { + Log.i("AudioByte", "playing") + (item as Audio).play() + } + + public actual override fun release() { + Log.i("AudioByte", "release") + audioPlayer.pause() + audioPlayer.src = "" + audioPlayer.load() + } +} \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 8317b04..86328a9 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -2,6 +2,7 @@ plugins { alias(libs.plugins.multiplatform).apply(false) alias(libs.plugins.android.library).apply(false) alias(libs.plugins.kotlinx.serialization.plugin) + alias(libs.plugins.native.cocoapods) alias(libs.plugins.dokka) } @@ -13,7 +14,7 @@ buildscript { allprojects { group = "app.lexilabs.basic" - version = "0.1.10" + version = "0.2.0" apply(plugin = "org.jetbrains.dokka") apply(plugin = "maven-publish") diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-error/-ad-error.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-error/-ad-error.html new file mode 100644 index 0000000..60ffbd0 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-error/-ad-error.html @@ -0,0 +1,82 @@ + + + + + AdError + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

AdError

+
+
+
+
constructor()
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-error/index.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-error/index.html new file mode 100644 index 0000000..a5b0e97 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-error/index.html @@ -0,0 +1,148 @@ + + + + + AdError + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

AdError

+
+
+
actual typealias AdError = com.google.android.gms.ads.AdError
expect open class AdError

Error information about why an ad didn't load.

actual open class AdError : Error
+
+
+
+
+
+

Constructors

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
constructor()
+
+
+
+
+
+
+
+

Properties

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
open val cause: Throwable?
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
open val message: String?
+
+
+
+
+
+
+
+
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-loader/-ad-loader.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-loader/-ad-loader.html new file mode 100644 index 0000000..31c87c6 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-loader/-ad-loader.html @@ -0,0 +1,84 @@ + + + + + AdLoader + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

AdLoader

+
+
+
+
constructor()
expect constructor()
constructor()
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-loader/index.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-loader/index.html new file mode 100644 index 0000000..8d4c297 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-loader/index.html @@ -0,0 +1,233 @@ + + + + + AdLoader + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

AdLoader

+
+
+
actual class AdLoader
expect class AdLoader

Used to send an AdRequest, hold loaded Ads, show fullscreen ads, and execute lambda expressions. Most functions require an Any value containing an Android Activity or null for iOS.

See also

actual class AdLoader
+
+
+
+
+
+

Constructors

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
constructor()
expect constructor()
constructor()
+
+
+
+
+
+
+
+

Functions

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
@RequiresPermission(value = "android.permission.INTERNET")
actual fun loadInterstitialAd(activity: Any?, adUnitId: String, onLoaded: () -> Unit)
expect fun loadInterstitialAd(activity: Any?, adUnitId: String, onLoaded: () -> Unit = {})

Requests and loads a fullscreen AdMob ad and notifies load completion via onLoaded lambda. Loaded ads are stored privately in each instantiation of AdLoader. As long as showInterstitialAd is called from the same AdLoader instance, the ad will display.

actual fun loadInterstitialAd(activity: Any?, adUnitId: String, onLoaded: () -> Unit)
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
@RequiresPermission(value = "android.permission.INTERNET")
actual fun loadRewardedAd(activity: Any?, adUnitId: String, onLoaded: () -> Unit)
expect fun loadRewardedAd(activity: Any?, adUnitId: String, onLoaded: () -> Unit = {})

Requests and loads a fullscreen AdMob ad and notifies load completion via onLoaded lambda. Loaded ads are stored privately in each instantiation of AdLoader. As long as showRewardedAd is called from the same AdLoader instance, the ad will display.

actual fun loadRewardedAd(activity: Any?, adUnitId: String, onLoaded: () -> Unit)
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
@RequiresPermission(value = "android.permission.INTERNET")
actual fun loadRewardedInterstitialAd(activity: Any?, adUnitId: String, onLoaded: () -> Unit)
expect fun loadRewardedInterstitialAd(activity: Any?, adUnitId: String, onLoaded: () -> Unit = {})

Requests and loads a fullscreen AdMob ad and notifies load completion via onLoaded lambda. Loaded ads are stored privately in each instantiation of AdLoader. As long as showRewardedInterstitialAd is called from the same AdLoader instance, the ad will display.

actual fun loadRewardedInterstitialAd(activity: Any?, adUnitId: String, onLoaded: () -> Unit)
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
@RequiresPermission(value = "android.permission.INTERNET")
actual fun requestAd(): AdRequest
expect fun requestAd(): AdRequest

Submits an AdRequest and returns the resulting AdRequest Loaded ads are stored privately in each instantiation of AdLoader. As long as showInterstitialAd is called from the same AdLoader instance, the ad will display.

actual fun requestAd(): AdRequest
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
@RequiresPermission(value = "android.permission.INTERNET")
actual fun showInterstitialAd(activity: Any?, onDismissed: () -> Unit)
expect fun showInterstitialAd(activity: Any?, onDismissed: () -> Unit = {})

Shows a fullscreen AdMob ad and notifies when the user closes the ad via onDismissed lambda. Loaded ads are stored privately in each instantiation of AdLoader. As long as loadInterstitialAd is called from the same AdLoader instance, the ad will display.

actual fun showInterstitialAd(activity: Any?, onDismissed: () -> Unit)
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
@RequiresPermission(value = "android.permission.INTERNET")
actual fun showRewardedAd(activity: Any?, onDismissed: () -> Unit, onRewardEarned: () -> Unit)
expect fun showRewardedAd(activity: Any?, onDismissed: () -> Unit = {}, onRewardEarned: () -> Unit = {})

Shows a rewarded and fullscreen AdMob ad. It notifies when the user closes the ad via onDismissed lambda and when the user earned a reward within the ad using lambda onRewardEarned Loaded ads are stored privately in each instantiation of AdLoader. As long as loadRewardedAd is called from the same AdLoader instance, the ad will display.

actual fun showRewardedAd(activity: Any?, onDismissed: () -> Unit, onRewardEarned: () -> Unit)
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
@RequiresPermission(value = "android.permission.INTERNET")
actual fun showRewardedInterstitialAd(activity: Any?, onDismissed: () -> Unit, onRewardEarned: () -> Unit)
expect fun showRewardedInterstitialAd(activity: Any?, onDismissed: () -> Unit = {}, onRewardEarned: () -> Unit = {})

Shows a rewarded and fullscreen AdMob ad. It notifies when the user closes the ad via onDismissed lambda and when the user earned a reward within the ad using lambda onRewardEarned Loaded ads are stored privately in each instantiation of AdLoader. As long as loadRewardedInterstitialAd is called from the same AdLoader instance, the ad will display.

actual fun showRewardedInterstitialAd(activity: Any?, onDismissed: () -> Unit, onRewardEarned: () -> Unit)
+
+
+
+
+
+
+
+
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-loader/load-interstitial-ad.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-loader/load-interstitial-ad.html new file mode 100644 index 0000000..96029d1 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-loader/load-interstitial-ad.html @@ -0,0 +1,84 @@ + + + + + loadInterstitialAd + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

loadInterstitialAd

+
+
+
+
@RequiresPermission(value = "android.permission.INTERNET")
actual fun loadInterstitialAd(activity: Any?, adUnitId: String, onLoaded: () -> Unit)
expect fun loadInterstitialAd(activity: Any?, adUnitId: String, onLoaded: () -> Unit = {})

Requests and loads a fullscreen AdMob ad and notifies load completion via onLoaded lambda. Loaded ads are stored privately in each instantiation of AdLoader. As long as showInterstitialAd is called from the same AdLoader instance, the ad will display.

Author

rjamison@lexilabs.app

Parameters

activity

Android Activity or iOS null value stored in an Any variable

adUnitId

AdMob AdUnitId String used by requestAd to load the ad

onLoaded

Lambda expression that executes when the AdRequest has fully loaded

See also

actual fun loadInterstitialAd(activity: Any?, adUnitId: String, onLoaded: () -> Unit)
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-loader/load-rewarded-ad.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-loader/load-rewarded-ad.html new file mode 100644 index 0000000..c303252 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-loader/load-rewarded-ad.html @@ -0,0 +1,84 @@ + + + + + loadRewardedAd + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

loadRewardedAd

+
+
+
+
@RequiresPermission(value = "android.permission.INTERNET")
actual fun loadRewardedAd(activity: Any?, adUnitId: String, onLoaded: () -> Unit)
expect fun loadRewardedAd(activity: Any?, adUnitId: String, onLoaded: () -> Unit = {})

Requests and loads a fullscreen AdMob ad and notifies load completion via onLoaded lambda. Loaded ads are stored privately in each instantiation of AdLoader. As long as showRewardedAd is called from the same AdLoader instance, the ad will display.

Author

rjamison@lexilabs.app

Parameters

activity

Android Activity or iOS null value stored in an Any variable

adUnitId

AdMob AdUnitId String used by requestAd to load the ad

onLoaded

Lambda expression that executes when the AdRequest has fully loaded

See also

actual fun loadRewardedAd(activity: Any?, adUnitId: String, onLoaded: () -> Unit)
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-loader/load-rewarded-interstitial-ad.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-loader/load-rewarded-interstitial-ad.html new file mode 100644 index 0000000..f9de667 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-loader/load-rewarded-interstitial-ad.html @@ -0,0 +1,84 @@ + + + + + loadRewardedInterstitialAd + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

loadRewardedInterstitialAd

+
+
+
+
@RequiresPermission(value = "android.permission.INTERNET")
actual fun loadRewardedInterstitialAd(activity: Any?, adUnitId: String, onLoaded: () -> Unit)
expect fun loadRewardedInterstitialAd(activity: Any?, adUnitId: String, onLoaded: () -> Unit = {})

Requests and loads a fullscreen AdMob ad and notifies load completion via onLoaded lambda. Loaded ads are stored privately in each instantiation of AdLoader. As long as showRewardedInterstitialAd is called from the same AdLoader instance, the ad will display.

Author

rjamison@lexilabs.app

Parameters

activity

Android Activity or iOS null value stored in an Any variable

adUnitId

AdMob AdUnitId String used by requestAd to load the ad

onLoaded

Lambda expression that executes when the AdRequest has fully loaded

See also

actual fun loadRewardedInterstitialAd(activity: Any?, adUnitId: String, onLoaded: () -> Unit)
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-loader/request-ad.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-loader/request-ad.html new file mode 100644 index 0000000..349c8ab --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-loader/request-ad.html @@ -0,0 +1,84 @@ + + + + + requestAd + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

requestAd

+
+
+
+
@RequiresPermission(value = "android.permission.INTERNET")
actual fun requestAd(): AdRequest
expect fun requestAd(): AdRequest

Submits an AdRequest and returns the resulting AdRequest Loaded ads are stored privately in each instantiation of AdLoader. As long as showInterstitialAd is called from the same AdLoader instance, the ad will display.

Return

a loaded or failed AdRequest

actual fun requestAd(): AdRequest
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-loader/show-interstitial-ad.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-loader/show-interstitial-ad.html new file mode 100644 index 0000000..97619a8 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-loader/show-interstitial-ad.html @@ -0,0 +1,84 @@ + + + + + showInterstitialAd + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

showInterstitialAd

+
+
+
+
@RequiresPermission(value = "android.permission.INTERNET")
actual fun showInterstitialAd(activity: Any?, onDismissed: () -> Unit)
expect fun showInterstitialAd(activity: Any?, onDismissed: () -> Unit = {})

Shows a fullscreen AdMob ad and notifies when the user closes the ad via onDismissed lambda. Loaded ads are stored privately in each instantiation of AdLoader. As long as loadInterstitialAd is called from the same AdLoader instance, the ad will display.

Author

rjamison@lexilabs.app

Parameters

activity

Android Activity or iOS null value stored in an Any variable

onDismissed

Lambda expression that executes when the user closes the ad

See also

actual fun showInterstitialAd(activity: Any?, onDismissed: () -> Unit)
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-loader/show-rewarded-ad.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-loader/show-rewarded-ad.html new file mode 100644 index 0000000..a27a68c --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-loader/show-rewarded-ad.html @@ -0,0 +1,84 @@ + + + + + showRewardedAd + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

showRewardedAd

+
+
+
+
@RequiresPermission(value = "android.permission.INTERNET")
actual fun showRewardedAd(activity: Any?, onDismissed: () -> Unit, onRewardEarned: () -> Unit)
expect fun showRewardedAd(activity: Any?, onDismissed: () -> Unit = {}, onRewardEarned: () -> Unit = {})

Shows a rewarded and fullscreen AdMob ad. It notifies when the user closes the ad via onDismissed lambda and when the user earned a reward within the ad using lambda onRewardEarned Loaded ads are stored privately in each instantiation of AdLoader. As long as loadRewardedAd is called from the same AdLoader instance, the ad will display.

Author

rjamison@lexilabs.app

Parameters

activity

Android Activity or iOS null value stored in an Any variable

onDismissed

Lambda expression that executes when the user closes the ad

onRewardEarned

Lambda expression that executes when the user earns a reward from the ad

See also

actual fun showRewardedAd(activity: Any?, onDismissed: () -> Unit, onRewardEarned: () -> Unit)
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-loader/show-rewarded-interstitial-ad.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-loader/show-rewarded-interstitial-ad.html new file mode 100644 index 0000000..d736a01 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-loader/show-rewarded-interstitial-ad.html @@ -0,0 +1,84 @@ + + + + + showRewardedInterstitialAd + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

showRewardedInterstitialAd

+
+
+
+
@RequiresPermission(value = "android.permission.INTERNET")
actual fun showRewardedInterstitialAd(activity: Any?, onDismissed: () -> Unit, onRewardEarned: () -> Unit)
expect fun showRewardedInterstitialAd(activity: Any?, onDismissed: () -> Unit = {}, onRewardEarned: () -> Unit = {})

Shows a rewarded and fullscreen AdMob ad. It notifies when the user closes the ad via onDismissed lambda and when the user earned a reward within the ad using lambda onRewardEarned Loaded ads are stored privately in each instantiation of AdLoader. As long as loadRewardedInterstitialAd is called from the same AdLoader instance, the ad will display.

Author

rjamison@lexilabs.app

Parameters

activity

Android Activity or iOS null value stored in an Any variable

onDismissed

Lambda expression that executes when the user closes the ad

onRewardEarned

Lambda expression that executes when the user earns a reward from the ad

See also

actual fun showRewardedInterstitialAd(activity: Any?, onDismissed: () -> Unit, onRewardEarned: () -> Unit)
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-request/index.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-request/index.html new file mode 100644 index 0000000..5d186cf --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-request/index.html @@ -0,0 +1,88 @@ + + + + + AdRequest + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

AdRequest

+
+
+
actual typealias AdRequest = com.google.android.gms.ads.AdRequest
expect class AdRequest

Generates components required for ad requests

actual typealias AdRequest = GADRequest
+
+
+
+
+
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-ad-size.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-ad-size.html new file mode 100644 index 0000000..4814b31 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-ad-size.html @@ -0,0 +1,84 @@ + + + + + AdSize + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

AdSize

+
+
+
+
actual constructor(width: Int, height: Int)
expect constructor(width: Int, height: Int)

Parameters

width

The width of the ad in whatever unit of measurement Google came up with

height

The height of the ad in whatever unit of measurement Google came up with

actual constructor(width: Int, height: Int)
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-a-u-t-o_-h-e-i-g-h-t.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-a-u-t-o_-h-e-i-g-h-t.html new file mode 100644 index 0000000..ebeb7ae --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-a-u-t-o_-h-e-i-g-h-t.html @@ -0,0 +1,84 @@ + + + + + AUTO_HEIGHT + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

AUTO_HEIGHT

+
+
+
+
actual val AUTO_HEIGHT: Int
expect val AUTO_HEIGHT: Int
actual val AUTO_HEIGHT: Int
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-b-a-n-n-e-r.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-b-a-n-n-e-r.html new file mode 100644 index 0000000..99eb14e --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-b-a-n-n-e-r.html @@ -0,0 +1,84 @@ + + + + + BANNER + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

BANNER

+
+
+
+
actual val BANNER: AdSize
expect val BANNER: AdSize
actual val BANNER: AdSize
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-f-l-u-i-d.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-f-l-u-i-d.html new file mode 100644 index 0000000..3ae08a0 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-f-l-u-i-d.html @@ -0,0 +1,84 @@ + + + + + FLUID + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

FLUID

+
+
+
+
actual val FLUID: AdSize
expect val FLUID: AdSize
actual val FLUID: AdSize
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-f-u-l-l_-b-a-n-n-e-r.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-f-u-l-l_-b-a-n-n-e-r.html new file mode 100644 index 0000000..c27c93e --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-f-u-l-l_-b-a-n-n-e-r.html @@ -0,0 +1,84 @@ + + + + + FULL_BANNER + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

FULL_BANNER

+
+
+
+
actual val FULL_BANNER: AdSize
expect val FULL_BANNER: AdSize
actual val FULL_BANNER: AdSize
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-f-u-l-l_-w-i-d-t-h.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-f-u-l-l_-w-i-d-t-h.html new file mode 100644 index 0000000..9c184b6 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-f-u-l-l_-w-i-d-t-h.html @@ -0,0 +1,84 @@ + + + + + FULL_WIDTH + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

FULL_WIDTH

+
+
+
+
actual val FULL_WIDTH: Int
expect val FULL_WIDTH: Int
actual val FULL_WIDTH: Int
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-i-n-v-a-l-i-d.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-i-n-v-a-l-i-d.html new file mode 100644 index 0000000..24f8db4 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-i-n-v-a-l-i-d.html @@ -0,0 +1,84 @@ + + + + + INVALID + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

INVALID

+
+
+
+
actual val INVALID: AdSize
expect val INVALID: AdSize
actual val INVALID: AdSize
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-l-a-r-g-e_-b-a-n-n-e-r.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-l-a-r-g-e_-b-a-n-n-e-r.html new file mode 100644 index 0000000..2a463db --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-l-a-r-g-e_-b-a-n-n-e-r.html @@ -0,0 +1,84 @@ + + + + + LARGE_BANNER + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

LARGE_BANNER

+
+
+
+
actual val LARGE_BANNER: AdSize
expect val LARGE_BANNER: AdSize
actual val LARGE_BANNER: AdSize
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-l-e-a-d-e-r-b-o-a-r-d.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-l-e-a-d-e-r-b-o-a-r-d.html new file mode 100644 index 0000000..51f56f1 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-l-e-a-d-e-r-b-o-a-r-d.html @@ -0,0 +1,84 @@ + + + + + LEADERBOARD + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

LEADERBOARD

+
+
+
+
actual val LEADERBOARD: AdSize
expect val LEADERBOARD: AdSize
actual val LEADERBOARD: AdSize
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-m-e-d-i-u-m_-r-e-c-t-a-n-g-l-e.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-m-e-d-i-u-m_-r-e-c-t-a-n-g-l-e.html new file mode 100644 index 0000000..4cda10e --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-m-e-d-i-u-m_-r-e-c-t-a-n-g-l-e.html @@ -0,0 +1,84 @@ + + + + + MEDIUM_RECTANGLE + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

MEDIUM_RECTANGLE

+
+
+
+
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-s-e-a-r-c-h.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-s-e-a-r-c-h.html new file mode 100644 index 0000000..cadbef4 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-s-e-a-r-c-h.html @@ -0,0 +1,84 @@ + + + + + SEARCH + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

SEARCH

+
+
+
+
actual val SEARCH: AdSize
expect val SEARCH: AdSize
actual val SEARCH: AdSize
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-w-i-d-e_-s-k-y-s-c-r-a-p-e-r.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-w-i-d-e_-s-k-y-s-c-r-a-p-e-r.html new file mode 100644 index 0000000..cf3ed12 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-w-i-d-e_-s-k-y-s-c-r-a-p-e-r.html @@ -0,0 +1,84 @@ + + + + + WIDE_SKYSCRAPER + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

WIDE_SKYSCRAPER

+
+
+
+
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/index.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/index.html new file mode 100644 index 0000000..abd47f3 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/index.html @@ -0,0 +1,280 @@ + + + + + Companion + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

Companion

+
+
+
actual object Companion
expect object Companion
actual object Companion
+
+
+
+
+
+

Properties

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
actual val AUTO_HEIGHT: Int
expect val AUTO_HEIGHT: Int
actual val AUTO_HEIGHT: Int
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
actual val BANNER: AdSize
expect val BANNER: AdSize
actual val BANNER: AdSize
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
actual val FLUID: AdSize
expect val FLUID: AdSize
actual val FLUID: AdSize
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
actual val FULL_BANNER: AdSize
expect val FULL_BANNER: AdSize
actual val FULL_BANNER: AdSize
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
actual val FULL_WIDTH: Int
expect val FULL_WIDTH: Int
actual val FULL_WIDTH: Int
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
actual val INVALID: AdSize
expect val INVALID: AdSize
actual val INVALID: AdSize
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
actual val LARGE_BANNER: AdSize
expect val LARGE_BANNER: AdSize
actual val LARGE_BANNER: AdSize
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
actual val LEADERBOARD: AdSize
expect val LEADERBOARD: AdSize
actual val LEADERBOARD: AdSize
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
actual val SEARCH: AdSize
expect val SEARCH: AdSize
actual val SEARCH: AdSize
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/height.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/height.html new file mode 100644 index 0000000..bf9be77 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/height.html @@ -0,0 +1,84 @@ + + + + + height + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

height

+
+
+
+
actual val height: Int
expect val height: Int

The height of the ad in whatever unit of measurement Google came up with

actual val height: Int
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/index.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/index.html new file mode 100644 index 0000000..1252000 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/index.html @@ -0,0 +1,224 @@ + + + + + AdSize + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

AdSize

+
+
+
actual class AdSize(val width: Int, val height: Int)
expect class AdSize(width: Int, height: Int)

Based on the AdMob implementation of AdSize, this module enables Android-like syntax to be used multiplatform.

Parameters

width

The width of the ad in whatever unit of measurement Google came up with

height

The height of the ad in whatever unit of measurement Google came up with

See also

actual class AdSize(val width: Int, val height: Int)
+
+
+
+
+
+

Constructors

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
actual constructor(width: Int, height: Int)
expect constructor(width: Int, height: Int)
actual constructor(width: Int, height: Int)
+
+
+
+
+
+
+
+

Types

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
actual object Companion
expect object Companion
actual object Companion
+
+
+
+
+
+
+
+

Properties

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
actual val height: Int
expect val height: Int

The height of the ad in whatever unit of measurement Google came up with

actual val height: Int
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
actual val width: Int
expect val width: Int

The width of the ad in whatever unit of measurement Google came up with

actual val width: Int
+
+
+
+
+
+
+
+

Functions

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
fun AdSize.toAndroid(): AdSize
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
fun toIos(): GADAdSize
+
+
+
+
+
+
+
+
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/to-ios.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/to-ios.html new file mode 100644 index 0000000..13fb546 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/to-ios.html @@ -0,0 +1,82 @@ + + + + + toIos + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

toIos

+
+
+
+
fun toIos(): GADAdSize
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/width.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/width.html new file mode 100644 index 0000000..78fd346 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-size/width.html @@ -0,0 +1,84 @@ + + + + + width + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

width

+
+
+
+
actual val width: Int
expect val width: Int

The width of the ad in whatever unit of measurement Google came up with

actual val width: Int
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-unit-id/-b-a-n-n-e-r_-d-e-f-a-u-l-t.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-unit-id/-b-a-n-n-e-r_-d-e-f-a-u-l-t.html new file mode 100644 index 0000000..becb82a --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-unit-id/-b-a-n-n-e-r_-d-e-f-a-u-l-t.html @@ -0,0 +1,84 @@ + + + + + BANNER_DEFAULT + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

BANNER_DEFAULT

+
+
+
+
actual const val BANNER_DEFAULT: String
actual const val BANNER_DEFAULT: String
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-unit-id/-i-n-t-e-r-s-t-i-t-i-a-l_-d-e-f-a-u-l-t.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-unit-id/-i-n-t-e-r-s-t-i-t-i-a-l_-d-e-f-a-u-l-t.html new file mode 100644 index 0000000..094f174 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-unit-id/-i-n-t-e-r-s-t-i-t-i-a-l_-d-e-f-a-u-l-t.html @@ -0,0 +1,84 @@ + + + + + INTERSTITIAL_DEFAULT + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

INTERSTITIAL_DEFAULT

+
+
+
+
actual const val INTERSTITIAL_DEFAULT: String
actual const val INTERSTITIAL_DEFAULT: String
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-unit-id/-r-e-w-a-r-d-e-d_-d-e-f-a-u-l-t.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-unit-id/-r-e-w-a-r-d-e-d_-d-e-f-a-u-l-t.html new file mode 100644 index 0000000..ac10fa0 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-unit-id/-r-e-w-a-r-d-e-d_-d-e-f-a-u-l-t.html @@ -0,0 +1,84 @@ + + + + + REWARDED_DEFAULT + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

REWARDED_DEFAULT

+
+
+
+
actual const val REWARDED_DEFAULT: String
actual const val REWARDED_DEFAULT: String
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-unit-id/-r-e-w-a-r-d-e-d_-i-n-t-e-r-s-t-i-t-i-a-l_-d-e-f-a-u-l-t.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-unit-id/-r-e-w-a-r-d-e-d_-i-n-t-e-r-s-t-i-t-i-a-l_-d-e-f-a-u-l-t.html new file mode 100644 index 0000000..00b3068 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-unit-id/-r-e-w-a-r-d-e-d_-i-n-t-e-r-s-t-i-t-i-a-l_-d-e-f-a-u-l-t.html @@ -0,0 +1,84 @@ + + + + + REWARDED_INTERSTITIAL_DEFAULT + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

REWARDED_INTERSTITIAL_DEFAULT

+
+
+
+
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-unit-id/auto-select.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-unit-id/auto-select.html new file mode 100644 index 0000000..b06b0d6 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-unit-id/auto-select.html @@ -0,0 +1,84 @@ + + + + + autoSelect + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

autoSelect

+
+
+
+
actual fun autoSelect(androidAdUnitId: String?, iosAdUnitId: String?): String
expect fun autoSelect(androidAdUnitId: String? = null, iosAdUnitId: String? = null): String

Provides a way of selecting an AdMob AdUnitId by platform during runtime. This function works for any ad type.

Parameters

androidAdUnitId

provide an AdUnitId String for Android implementation

iosAdUnitId

provide an AdUnitId String for iOS implementation

actual fun autoSelect(androidAdUnitId: String?, iosAdUnitId: String?): String
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-unit-id/index.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-unit-id/index.html new file mode 100644 index 0000000..64e962f --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-unit-id/index.html @@ -0,0 +1,182 @@ + + + + + AdUnitId + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

AdUnitId

+
+
+
actual object AdUnitId
expect object AdUnitId

An object used to hold functions related to AdMob AdUnitIds

See also

actual object AdUnitId
+
+
+
+
+
+

Properties

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
actual const val BANNER_DEFAULT: String
actual const val BANNER_DEFAULT: String
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
actual const val INTERSTITIAL_DEFAULT: String
actual const val INTERSTITIAL_DEFAULT: String
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
actual const val REWARDED_DEFAULT: String
actual const val REWARDED_DEFAULT: String
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Functions

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
actual fun autoSelect(androidAdUnitId: String?, iosAdUnitId: String?): String
expect fun autoSelect(androidAdUnitId: String? = null, iosAdUnitId: String? = null): String

Provides a way of selecting an AdMob AdUnitId by platform during runtime. This function works for any ad type.

actual fun autoSelect(androidAdUnitId: String?, iosAdUnitId: String?): String
+
+
+
+
+
+
+
+
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-view/index.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-view/index.html new file mode 100644 index 0000000..2858803 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-ad-view/index.html @@ -0,0 +1,86 @@ + + + + + AdView + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

AdView

+
+
+
typealias AdView = com.google.android.gms.ads.AdView
+
+
+
+
+
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-banner-ad.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-banner-ad.html new file mode 100644 index 0000000..f817a2f --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-banner-ad.html @@ -0,0 +1,84 @@ + + + + + BannerAd + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

BannerAd

+
+
+
+
@RequiresPermission(value = "android.permission.INTERNET")
actual fun BannerAd(adUnitId: String, adSize: AdSize)
expect fun BannerAd(adUnitId: String = AdUnitId.BANNER_DEFAULT, adSize: AdSize = AdSize.FULL_BANNER)

Loads and displays a Banner Ad using a Composable.

Parameters

adUnitId

Your AdMob AdUnitId String

adSize

Your AdMob AdSize

See also

actual fun BannerAd(adUnitId: String, adSize: AdSize)
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-basic-ads/configuration.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-basic-ads/configuration.html new file mode 100644 index 0000000..61b007b --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-basic-ads/configuration.html @@ -0,0 +1,84 @@ + + + + + configuration + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

configuration

+
+
+
+
actual var configuration: RequestConfiguration
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-basic-ads/disable-mediation-adapter-initialization.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-basic-ads/disable-mediation-adapter-initialization.html new file mode 100644 index 0000000..9ea8a80 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-basic-ads/disable-mediation-adapter-initialization.html @@ -0,0 +1,84 @@ + + + + + disableMediationAdapterInitialization + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

disableMediationAdapterInitialization

+
+
+
+

I have no idea what this does, but its here and it works on Android and iOS

Parameters

context

Android Context or null for iOS, passed in an Any variable

See also

+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-basic-ads/error-domain.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-basic-ads/error-domain.html new file mode 100644 index 0000000..173cd56 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-basic-ads/error-domain.html @@ -0,0 +1,84 @@ + + + + + errorDomain + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

errorDomain

+
+
+
+
actual val errorDomain: String
expect val errorDomain: String

The domain name of which errors occur on

See also

actual val errorDomain: String
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-basic-ads/index.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-basic-ads/index.html new file mode 100644 index 0000000..a1fd70b --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-basic-ads/index.html @@ -0,0 +1,250 @@ + + + + + BasicAds + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

BasicAds

+
+
+
actual object BasicAds
expect object BasicAds

The main module for instantiating Android and iOS implementations of AdMob

See also

actual object BasicAds
+
+
+
+
+
+

Properties

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+

The RequestConfiguration for the instantiation of AdMob

actual var configuration: RequestConfiguration
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
actual val errorDomain: String
expect val errorDomain: String

The domain name of which errors occur on

actual val errorDomain: String
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
actual val initialized: Boolean
expect val initialized: Boolean

Whether or not the BasicAds.initialize was called successfully

actual val initialized: Boolean
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
actual val version: String
expect val version: String

The version of AdMob being used

actual val version: String
+
+
+
+
+
+
+
+

Functions

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+

I have no idea what this does, but its here and it works on Android and iOS

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
@RequiresPermission(value = "android.permission.INTERNET")
actual fun initialize(context: Any?)
expect fun initialize(context: Any?)

The main function for instantiating Android and iOS implementations of AdMob. It is equivalent to Android's MobileAds.Initialize(context).

actual fun initialize(context: Any?)
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
actual fun openDebugMenu(context: Any?, adUnitId: String)
expect fun openDebugMenu(context: Any?, adUnitId: String)

This opens the Debug Menu, which I have never personally done myself.

actual fun openDebugMenu(context: Any?, adUnitId: String)
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
actual fun setAppMuted(muted: Boolean)
expect fun setAppMuted(muted: Boolean)

Mutes or unmutes ads

actual fun setAppMuted(muted: Boolean)
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
actual fun setAppVolume(volume: Float)
expect fun setAppVolume(volume: Float)

Sets the volume of ads based on a Float value between 0.0 for muted and 1.0 for full volume.

actual fun setAppVolume(volume: Float)
+
+
+
+
+
+
+
+
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-basic-ads/initialize.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-basic-ads/initialize.html new file mode 100644 index 0000000..8d56245 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-basic-ads/initialize.html @@ -0,0 +1,84 @@ + + + + + initialize + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

initialize

+
+
+
+
@RequiresPermission(value = "android.permission.INTERNET")
actual fun initialize(context: Any?)
expect fun initialize(context: Any?)

The main function for instantiating Android and iOS implementations of AdMob. It is equivalent to Android's MobileAds.Initialize(context).

Parameters

context

Android Context or null for iOS, passed in an Any variable

See also

Throws

when run outside the MainThread

actual fun initialize(context: Any?)
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-basic-ads/initialized.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-basic-ads/initialized.html new file mode 100644 index 0000000..f1f1e4c --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-basic-ads/initialized.html @@ -0,0 +1,84 @@ + + + + + initialized + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

initialized

+
+
+
+
actual val initialized: Boolean
expect val initialized: Boolean

Whether or not the BasicAds.initialize was called successfully

See also

actual val initialized: Boolean
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-basic-ads/open-debug-menu.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-basic-ads/open-debug-menu.html new file mode 100644 index 0000000..145cdf5 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-basic-ads/open-debug-menu.html @@ -0,0 +1,84 @@ + + + + + openDebugMenu + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

openDebugMenu

+
+
+
+
actual fun openDebugMenu(context: Any?, adUnitId: String)
expect fun openDebugMenu(context: Any?, adUnitId: String)

This opens the Debug Menu, which I have never personally done myself.

Parameters

context

Android Context or null for iOS, passed in an Any variable

adUnitId

AdMob AdUnitId String for AdRequest

See also

actual fun openDebugMenu(context: Any?, adUnitId: String)
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-basic-ads/set-app-muted.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-basic-ads/set-app-muted.html new file mode 100644 index 0000000..4f3256b --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-basic-ads/set-app-muted.html @@ -0,0 +1,84 @@ + + + + + setAppMuted + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

setAppMuted

+
+
+
+
actual fun setAppMuted(muted: Boolean)
expect fun setAppMuted(muted: Boolean)

Mutes or unmutes ads

Parameters

muted

a Boolean value that should evaluate true when muted and false when unmuted

actual fun setAppMuted(muted: Boolean)
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-basic-ads/set-app-volume.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-basic-ads/set-app-volume.html new file mode 100644 index 0000000..a991e10 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-basic-ads/set-app-volume.html @@ -0,0 +1,84 @@ + + + + + setAppVolume + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

setAppVolume

+
+
+
+
actual fun setAppVolume(volume: Float)
expect fun setAppVolume(volume: Float)

Sets the volume of ads based on a Float value between 0.0 for muted and 1.0 for full volume.

Parameters

volume

a Float value between 0.0 for muted and 1.0 for full volume.

actual fun setAppVolume(volume: Float)
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-basic-ads/version.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-basic-ads/version.html new file mode 100644 index 0000000..4371fbf --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-basic-ads/version.html @@ -0,0 +1,84 @@ + + + + + version + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

version

+
+
+
+
actual val version: String
expect val version: String

The version of AdMob being used

See also

actual val version: String
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-depends-on-google-mobile-ads/index.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-depends-on-google-mobile-ads/index.html new file mode 100644 index 0000000..6e0d87b --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-depends-on-google-mobile-ads/index.html @@ -0,0 +1,84 @@ + + + + + DependsOnGoogleMobileAds + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

DependsOnGoogleMobileAds

+

For Android, complete the steps in AdMob's instructions:

For iOS, complete the steps in AdMob's instructions:

NOTE: For Xcode 13+, you can update your Custom iOS Target Properties.

Once complete, you'll need to call BasicAds.initialize in your commonMain before calling for ads.

NOTE: You do not need to initialize within each platform.

Throws

ClassNotFoundException
+
+
+
+
+
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-experimental-basic-ads/index.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-experimental-basic-ads/index.html new file mode 100644 index 0000000..193a6b1 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-experimental-basic-ads/index.html @@ -0,0 +1,84 @@ + + + + + ExperimentalBasicAds + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

ExperimentalBasicAds

+

This API is not considered 'production' until reaching version 1.0.0 or higher

+
+
+
+
+
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-interstitial-ad.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-interstitial-ad.html new file mode 100644 index 0000000..fa188d6 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-interstitial-ad.html @@ -0,0 +1,84 @@ + + + + + InterstitialAd + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

InterstitialAd

+
+
+
+
@RequiresPermission(value = "android.permission.INTERNET")
actual fun InterstitialAd(activity: Any?, adUnitId: String, onDismissed: () -> Unit)
expect fun InterstitialAd(activity: Any? = null, adUnitId: String = AdUnitId.INTERSTITIAL_DEFAULT, onDismissed: () -> Unit = {})

Loads and displays an Interstitial Ad using a Composable.

Parameters

adUnitId

Your AdMob AdUnitId String

onDismissed

Lambda that executes when the user closes the ad

See also

actual fun InterstitialAd(activity: Any?, adUnitId: String, onDismissed: () -> Unit)
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-m-a-x_-a-d_-c-o-n-t-e-n-t_-r-a-t-i-n-g_-g.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-m-a-x_-a-d_-c-o-n-t-e-n-t_-r-a-t-i-n-g_-g.html new file mode 100644 index 0000000..9674eae --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-m-a-x_-a-d_-c-o-n-t-e-n-t_-r-a-t-i-n-g_-g.html @@ -0,0 +1,80 @@ + + + + + MAX_AD_CONTENT_RATING_G + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

MAX_AD_CONTENT_RATING_G

+
+ +
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-m-a-x_-a-d_-c-o-n-t-e-n-t_-r-a-t-i-n-g_-m-a.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-m-a-x_-a-d_-c-o-n-t-e-n-t_-r-a-t-i-n-g_-m-a.html new file mode 100644 index 0000000..76944f7 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-m-a-x_-a-d_-c-o-n-t-e-n-t_-r-a-t-i-n-g_-m-a.html @@ -0,0 +1,80 @@ + + + + + MAX_AD_CONTENT_RATING_MA + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

MAX_AD_CONTENT_RATING_MA

+
+ +
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-m-a-x_-a-d_-c-o-n-t-e-n-t_-r-a-t-i-n-g_-p-g.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-m-a-x_-a-d_-c-o-n-t-e-n-t_-r-a-t-i-n-g_-p-g.html new file mode 100644 index 0000000..a7c11e3 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-m-a-x_-a-d_-c-o-n-t-e-n-t_-r-a-t-i-n-g_-p-g.html @@ -0,0 +1,80 @@ + + + + + MAX_AD_CONTENT_RATING_PG + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

MAX_AD_CONTENT_RATING_PG

+
+ +
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-m-a-x_-a-d_-c-o-n-t-e-n-t_-r-a-t-i-n-g_-t.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-m-a-x_-a-d_-c-o-n-t-e-n-t_-r-a-t-i-n-g_-t.html new file mode 100644 index 0000000..bc4556b --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-m-a-x_-a-d_-c-o-n-t-e-n-t_-r-a-t-i-n-g_-t.html @@ -0,0 +1,80 @@ + + + + + MAX_AD_CONTENT_RATING_T + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

MAX_AD_CONTENT_RATING_T

+
+ +
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-m-a-x_-a-d_-c-o-n-t-e-n-t_-r-a-t-i-n-g_-u-n-s-p-e-c-i-f-i-e-d.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-m-a-x_-a-d_-c-o-n-t-e-n-t_-r-a-t-i-n-g_-u-n-s-p-e-c-i-f-i-e-d.html new file mode 100644 index 0000000..bf6d26a --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-m-a-x_-a-d_-c-o-n-t-e-n-t_-r-a-t-i-n-g_-u-n-s-p-e-c-i-f-i-e-d.html @@ -0,0 +1,80 @@ + + + + + MAX_AD_CONTENT_RATING_UNSPECIFIED + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

MAX_AD_CONTENT_RATING_UNSPECIFIED

+
+ +
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-t-a-g_-f-o-r_-c-h-i-l-d_-d-i-r-e-c-t-e-d_-t-r-e-a-t-m-e-n-t_-f-a-l-s-e.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-t-a-g_-f-o-r_-c-h-i-l-d_-d-i-r-e-c-t-e-d_-t-r-e-a-t-m-e-n-t_-f-a-l-s-e.html new file mode 100644 index 0000000..47e7d3d --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-t-a-g_-f-o-r_-c-h-i-l-d_-d-i-r-e-c-t-e-d_-t-r-e-a-t-m-e-n-t_-f-a-l-s-e.html @@ -0,0 +1,80 @@ + + + + + TAG_FOR_CHILD_DIRECTED_TREATMENT_FALSE + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

TAG_FOR_CHILD_DIRECTED_TREATMENT_FALSE

+
+ +
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-t-a-g_-f-o-r_-c-h-i-l-d_-d-i-r-e-c-t-e-d_-t-r-e-a-t-m-e-n-t_-t-r-u-e.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-t-a-g_-f-o-r_-c-h-i-l-d_-d-i-r-e-c-t-e-d_-t-r-e-a-t-m-e-n-t_-t-r-u-e.html new file mode 100644 index 0000000..ec06771 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-t-a-g_-f-o-r_-c-h-i-l-d_-d-i-r-e-c-t-e-d_-t-r-e-a-t-m-e-n-t_-t-r-u-e.html @@ -0,0 +1,80 @@ + + + + + TAG_FOR_CHILD_DIRECTED_TREATMENT_TRUE + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

TAG_FOR_CHILD_DIRECTED_TREATMENT_TRUE

+
+ +
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-t-a-g_-f-o-r_-c-h-i-l-d_-d-i-r-e-c-t-e-d_-t-r-e-a-t-m-e-n-t_-u-n-s-p-e-c-i-f-i-e-d.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-t-a-g_-f-o-r_-c-h-i-l-d_-d-i-r-e-c-t-e-d_-t-r-e-a-t-m-e-n-t_-u-n-s-p-e-c-i-f-i-e-d.html new file mode 100644 index 0000000..4f28b75 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-t-a-g_-f-o-r_-c-h-i-l-d_-d-i-r-e-c-t-e-d_-t-r-e-a-t-m-e-n-t_-u-n-s-p-e-c-i-f-i-e-d.html @@ -0,0 +1,80 @@ + + + + + TAG_FOR_CHILD_DIRECTED_TREATMENT_UNSPECIFIED + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

TAG_FOR_CHILD_DIRECTED_TREATMENT_UNSPECIFIED

+
+ +
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-t-a-g_-f-o-r_-u-n-d-e-r_-a-g-e_-o-f_-c-o-n-s-e-n-t_-f-a-l-s-e.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-t-a-g_-f-o-r_-u-n-d-e-r_-a-g-e_-o-f_-c-o-n-s-e-n-t_-f-a-l-s-e.html new file mode 100644 index 0000000..92606d4 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-t-a-g_-f-o-r_-u-n-d-e-r_-a-g-e_-o-f_-c-o-n-s-e-n-t_-f-a-l-s-e.html @@ -0,0 +1,80 @@ + + + + + TAG_FOR_UNDER_AGE_OF_CONSENT_FALSE + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

TAG_FOR_UNDER_AGE_OF_CONSENT_FALSE

+
+ +
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-t-a-g_-f-o-r_-u-n-d-e-r_-a-g-e_-o-f_-c-o-n-s-e-n-t_-t-r-u-e.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-t-a-g_-f-o-r_-u-n-d-e-r_-a-g-e_-o-f_-c-o-n-s-e-n-t_-t-r-u-e.html new file mode 100644 index 0000000..a72173c --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-t-a-g_-f-o-r_-u-n-d-e-r_-a-g-e_-o-f_-c-o-n-s-e-n-t_-t-r-u-e.html @@ -0,0 +1,80 @@ + + + + + TAG_FOR_UNDER_AGE_OF_CONSENT_TRUE + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

TAG_FOR_UNDER_AGE_OF_CONSENT_TRUE

+
+ +
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-t-a-g_-f-o-r_-u-n-d-e-r_-a-g-e_-o-f_-c-o-n-s-e-n-t_-u-n-s-p-e-c-i-f-i-e-d.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-t-a-g_-f-o-r_-u-n-d-e-r_-a-g-e_-o-f_-c-o-n-s-e-n-t_-u-n-s-p-e-c-i-f-i-e-d.html new file mode 100644 index 0000000..d5e80f1 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-t-a-g_-f-o-r_-u-n-d-e-r_-a-g-e_-o-f_-c-o-n-s-e-n-t_-u-n-s-p-e-c-i-f-i-e-d.html @@ -0,0 +1,80 @@ + + + + + TAG_FOR_UNDER_AGE_OF_CONSENT_UNSPECIFIED + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

TAG_FOR_UNDER_AGE_OF_CONSENT_UNSPECIFIED

+
+ +
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/index.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/index.html new file mode 100644 index 0000000..59482c2 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/index.html @@ -0,0 +1,254 @@ + + + + + Companion + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

Companion

+
object Companion
+
+
+
+
+
+

Properties

+
+
+
+
+ + +
Link copied to clipboard
+
+
+ +
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+ +
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+ +
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+ +
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+ +
+
+ +
+
+
+ + +
Link copied to clipboard
+
+ +
+
+ +
+
+
+ + +
Link copied to clipboard
+
+ +
+
+ +
+
+
+ + +
Link copied to clipboard
+
+ +
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+ +
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+ +
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+ +
+
+
+
+
+
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-publisher-privacy-personalization-state/-companion/from-int.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-publisher-privacy-personalization-state/-companion/from-int.html new file mode 100644 index 0000000..e119d80 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-publisher-privacy-personalization-state/-companion/from-int.html @@ -0,0 +1,80 @@ + + + + + fromInt + + + + + + + + + + + + + + + + + + + +
+ + +
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-publisher-privacy-personalization-state/-companion/index.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-publisher-privacy-personalization-state/-companion/index.html new file mode 100644 index 0000000..1c98757 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-publisher-privacy-personalization-state/-companion/index.html @@ -0,0 +1,104 @@ + + + + + Companion + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

Companion

+
object Companion
+
+
+
+
+
+

Functions

+
+
+
+
+ + +
Link copied to clipboard
+
+ +
+
+
+
+
+
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-publisher-privacy-personalization-state/-d-e-f-a-u-l-t/index.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-publisher-privacy-personalization-state/-d-e-f-a-u-l-t/index.html new file mode 100644 index 0000000..82156b3 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-publisher-privacy-personalization-state/-d-e-f-a-u-l-t/index.html @@ -0,0 +1,119 @@ + + + + + DEFAULT + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

DEFAULT

+ +
+
+
+
+
+

Properties

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+
+
+
+
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-publisher-privacy-personalization-state/-d-i-s-a-b-l-e-d/index.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-publisher-privacy-personalization-state/-d-i-s-a-b-l-e-d/index.html new file mode 100644 index 0000000..86609da --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-publisher-privacy-personalization-state/-d-i-s-a-b-l-e-d/index.html @@ -0,0 +1,119 @@ + + + + + DISABLED + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

DISABLED

+ +
+
+
+
+
+

Properties

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+
+
+
+
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-publisher-privacy-personalization-state/-e-n-a-b-l-e-d/index.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-publisher-privacy-personalization-state/-e-n-a-b-l-e-d/index.html new file mode 100644 index 0000000..0c156d9 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-publisher-privacy-personalization-state/-e-n-a-b-l-e-d/index.html @@ -0,0 +1,119 @@ + + + + + ENABLED + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

ENABLED

+ +
+
+
+
+
+

Properties

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+
+
+
+
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-publisher-privacy-personalization-state/entries.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-publisher-privacy-personalization-state/entries.html new file mode 100644 index 0000000..abad695 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-publisher-privacy-personalization-state/entries.html @@ -0,0 +1,80 @@ + + + + + entries + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

entries

+
+

Returns a representation of an immutable list of all enum entries, in the order they're declared.

This method may be used to iterate over the enum entries.

+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-publisher-privacy-personalization-state/index.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-publisher-privacy-personalization-state/index.html new file mode 100644 index 0000000..793c76b --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-publisher-privacy-personalization-state/index.html @@ -0,0 +1,254 @@ + + + + + PublisherPrivacyPersonalizationState + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ + +
+
+
+
+

Entries

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+
+
+
+

Types

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
object Companion
+
+
+
+
+
+
+
+

Properties

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+

Returns a representation of an immutable list of all enum entries, in the order they're declared.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+
+
+
+

Functions

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
fun RequestConfiguration.PublisherPrivacyPersonalizationState.toAndroid(): RequestConfiguration.PublisherPrivacyPersonalizationState
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Returns an array containing the constants of this enum type, in the order they're declared.

+
+
+
+
+
+
+
+
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-publisher-privacy-personalization-state/value-of.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-publisher-privacy-personalization-state/value-of.html new file mode 100644 index 0000000..26dd592 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-publisher-privacy-personalization-state/value-of.html @@ -0,0 +1,80 @@ + + + + + valueOf + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

valueOf

+
+

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Throws

if this enum type has no constant with the specified name

+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-publisher-privacy-personalization-state/values.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-publisher-privacy-personalization-state/values.html new file mode 100644 index 0000000..c05301a --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-publisher-privacy-personalization-state/values.html @@ -0,0 +1,80 @@ + + + + + values + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

values

+
+

Returns an array containing the constants of this enum type, in the order they're declared.

This method may be used to iterate over the constants.

+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-request-configuration.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-request-configuration.html new file mode 100644 index 0000000..0b68143 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/-request-configuration.html @@ -0,0 +1,80 @@ + + + + + RequestConfiguration + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

RequestConfiguration

+
+
constructor(maxAdContentRating: String?, publisherPrivacyPersonalizationState: RequestConfiguration.PublisherPrivacyPersonalizationState, tagForChildDirectedTreatment: Int, tagForUnderAgeOfConsent: Int, testDeviceIds: List<String?>?)

Parameters

maxAdContentRating

The maximum content rating of the ads you wish to display

publisherPrivacyPersonalizationState

The privacy level of the ads

tagForChildDirectedTreatment

Should ads be appropriate for children

tagForUnderAgeOfConsent

Should ads be limited to content for children under the age of consent

testDeviceIds

A List of id String for testing devices

+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/index.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/index.html new file mode 100644 index 0000000..5e92c5d --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/index.html @@ -0,0 +1,239 @@ + + + + + RequestConfiguration + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

RequestConfiguration

+
data class RequestConfiguration(val maxAdContentRating: String?, val publisherPrivacyPersonalizationState: RequestConfiguration.PublisherPrivacyPersonalizationState, val tagForChildDirectedTreatment: Int, val tagForUnderAgeOfConsent: Int, val testDeviceIds: List<String?>?)

Sets the initial configuration of your AdMob instance for Android and iOS

Parameters

maxAdContentRating

The maximum content rating of the ads you wish to display

publisherPrivacyPersonalizationState

The privacy level of the ads

tagForChildDirectedTreatment

Should ads be appropriate for children

tagForUnderAgeOfConsent

Should ads be limited to content for children under the age of consent

testDeviceIds

A List of id String for testing devices

See also

+
+
+
+
+
+

Constructors

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
constructor(maxAdContentRating: String?, publisherPrivacyPersonalizationState: RequestConfiguration.PublisherPrivacyPersonalizationState, tagForChildDirectedTreatment: Int, tagForUnderAgeOfConsent: Int, testDeviceIds: List<String?>?)
+
+
+
+
+
+
+
+

Types

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
object Companion
+
+
+
+
+ + +
+
+
+

Properties

+
+
+
+
+ + +
Link copied to clipboard
+
+
+ +
+
+
+ + + +
+
+
+ + +
Link copied to clipboard
+
+ +
+
+ +
+
+
+ + +
Link copied to clipboard
+
+ +
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+
+
+
+

Functions

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
fun RequestConfiguration.toAndroid(): RequestConfiguration
+
+
+
+
+
+
+
+
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/max-ad-content-rating.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/max-ad-content-rating.html new file mode 100644 index 0000000..4a939c9 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/max-ad-content-rating.html @@ -0,0 +1,80 @@ + + + + + maxAdContentRating + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

maxAdContentRating

+
+

Parameters

maxAdContentRating

The maximum content rating of the ads you wish to display

+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/publisher-privacy-personalization-state.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/publisher-privacy-personalization-state.html new file mode 100644 index 0000000..d444075 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/publisher-privacy-personalization-state.html @@ -0,0 +1,80 @@ + + + + + publisherPrivacyPersonalizationState + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

publisherPrivacyPersonalizationState

+
+

Parameters

publisherPrivacyPersonalizationState

The privacy level of the ads

+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/tag-for-child-directed-treatment.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/tag-for-child-directed-treatment.html new file mode 100644 index 0000000..27faee9 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/tag-for-child-directed-treatment.html @@ -0,0 +1,80 @@ + + + + + tagForChildDirectedTreatment + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

tagForChildDirectedTreatment

+
+

Parameters

tagForChildDirectedTreatment

Should ads be appropriate for children

+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/tag-for-under-age-of-consent.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/tag-for-under-age-of-consent.html new file mode 100644 index 0000000..7ffa837 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/tag-for-under-age-of-consent.html @@ -0,0 +1,80 @@ + + + + + tagForUnderAgeOfConsent + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

tagForUnderAgeOfConsent

+
+

Parameters

tagForUnderAgeOfConsent

Should ads be limited to content for children under the age of consent

+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/test-device-ids.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/test-device-ids.html new file mode 100644 index 0000000..cfe676b --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-request-configuration/test-device-ids.html @@ -0,0 +1,80 @@ + + + + + testDeviceIds + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

testDeviceIds

+
+

Parameters

testDeviceIds

A List of id String for testing devices

+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-rewarded-ad.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-rewarded-ad.html new file mode 100644 index 0000000..181d1b1 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-rewarded-ad.html @@ -0,0 +1,84 @@ + + + + + RewardedAd + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

RewardedAd

+
+
+
+
@RequiresPermission(value = "android.permission.INTERNET")
actual fun RewardedAd(activity: Any?, adUnitId: String, onDismissed: () -> Unit, onRewardEarned: () -> Unit)
expect fun RewardedAd(activity: Any? = null, adUnitId: String = AdUnitId.REWARDED_DEFAULT, onDismissed: () -> Unit = {}, onRewardEarned: () -> Unit = {})

Loads and displays a Rewarded Ad using a Composable.

Parameters

adUnitId

Your AdMob AdUnitId String

onDismissed

Lambda that executes when the user closes the ad

onRewardEarned

Lambda that executes when the user has earned an ad-related reward

See also

actual fun RewardedAd(activity: Any?, adUnitId: String, onDismissed: () -> Unit, onRewardEarned: () -> Unit)
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-rewarded-interstitial-ad.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-rewarded-interstitial-ad.html new file mode 100644 index 0000000..8482694 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/-rewarded-interstitial-ad.html @@ -0,0 +1,84 @@ + + + + + RewardedInterstitialAd + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

RewardedInterstitialAd

+
+
+
+
@RequiresPermission(value = "android.permission.INTERNET")
actual fun RewardedInterstitialAd(activity: Any?, adUnitId: String, onDismissed: () -> Unit, onRewardEarned: () -> Unit)
expect fun RewardedInterstitialAd(activity: Any? = null, adUnitId: String = AdUnitId.REWARDED_INTERSTITIAL_DEFAULT, onDismissed: () -> Unit = {}, onRewardEarned: () -> Unit = {})

Loads and displays a Rewarded Interstitial Ad using a Composable.

Parameters

adUnitId

Your AdMob AdUnitId String

onDismissed

Lambda that executes when the user closes the ad

onRewardEarned

Lambda that executes when the user has earned an ad-related reward

See also

actual fun RewardedInterstitialAd(activity: Any?, adUnitId: String, onDismissed: () -> Unit, onRewardEarned: () -> Unit)
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/index.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/index.html new file mode 100644 index 0000000..4d458be --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/index.html @@ -0,0 +1,377 @@ + + + + + app.lexilabs.basic.ads + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

Package-level declarations

+
+
+
+
+
+

Types

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
actual typealias AdError = com.google.android.gms.ads.AdError
expect open class AdError

Error information about why an ad didn't load.

actual open class AdError : Error
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
actual class AdLoader
expect class AdLoader

Used to send an AdRequest, hold loaded Ads, show fullscreen ads, and execute lambda expressions. Most functions require an Any value containing an Android Activity or null for iOS.

actual class AdLoader
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
actual typealias AdRequest = com.google.android.gms.ads.AdRequest
expect class AdRequest

Generates components required for ad requests

actual typealias AdRequest = GADRequest
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
actual class AdSize(val width: Int, val height: Int)
expect class AdSize(width: Int, height: Int)

Based on the AdMob implementation of AdSize, this module enables Android-like syntax to be used multiplatform.

actual class AdSize(val width: Int, val height: Int)
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
actual object AdUnitId
expect object AdUnitId

An object used to hold functions related to AdMob AdUnitIds

actual object AdUnitId
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
typealias AdView = com.google.android.gms.ads.AdView
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
actual object BasicAds
expect object BasicAds

The main module for instantiating Android and iOS implementations of AdMob

actual object BasicAds
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

For Android, complete the steps in AdMob's instructions:

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

This API is not considered 'production' until reaching version 1.0.0 or higher

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
data class RequestConfiguration(val maxAdContentRating: String?, val publisherPrivacyPersonalizationState: RequestConfiguration.PublisherPrivacyPersonalizationState, val tagForChildDirectedTreatment: Int, val tagForUnderAgeOfConsent: Int, val testDeviceIds: List<String?>?)

Sets the initial configuration of your AdMob instance for Android and iOS

+
+
+
+
+
+
+
+

Functions

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
@RequiresPermission(value = "android.permission.INTERNET")
actual fun BannerAd(adUnitId: String, adSize: AdSize)
expect fun BannerAd(adUnitId: String = AdUnitId.BANNER_DEFAULT, adSize: AdSize = AdSize.FULL_BANNER)

Loads and displays a Banner Ad using a Composable.

actual fun BannerAd(adUnitId: String, adSize: AdSize)
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
@RequiresPermission(value = "android.permission.INTERNET")
actual fun InterstitialAd(activity: Any?, adUnitId: String, onDismissed: () -> Unit)
expect fun InterstitialAd(activity: Any? = null, adUnitId: String = AdUnitId.INTERSTITIAL_DEFAULT, onDismissed: () -> Unit = {})

Loads and displays an Interstitial Ad using a Composable.

actual fun InterstitialAd(activity: Any?, adUnitId: String, onDismissed: () -> Unit)
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
@RequiresPermission(value = "android.permission.INTERNET")
actual fun RewardedAd(activity: Any?, adUnitId: String, onDismissed: () -> Unit, onRewardEarned: () -> Unit)
expect fun RewardedAd(activity: Any? = null, adUnitId: String = AdUnitId.REWARDED_DEFAULT, onDismissed: () -> Unit = {}, onRewardEarned: () -> Unit = {})

Loads and displays a Rewarded Ad using a Composable.

actual fun RewardedAd(activity: Any?, adUnitId: String, onDismissed: () -> Unit, onRewardEarned: () -> Unit)
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
@RequiresPermission(value = "android.permission.INTERNET")
actual fun RewardedInterstitialAd(activity: Any?, adUnitId: String, onDismissed: () -> Unit, onRewardEarned: () -> Unit)
expect fun RewardedInterstitialAd(activity: Any? = null, adUnitId: String = AdUnitId.REWARDED_INTERSTITIAL_DEFAULT, onDismissed: () -> Unit = {}, onRewardEarned: () -> Unit = {})

Loads and displays a Rewarded Interstitial Ad using a Composable.

actual fun RewardedInterstitialAd(activity: Any?, adUnitId: String, onDismissed: () -> Unit, onRewardEarned: () -> Unit)
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
fun AdSize.toAndroid(): AdSize
fun RequestConfiguration.toAndroid(): RequestConfiguration
fun RequestConfiguration.PublisherPrivacyPersonalizationState.toAndroid(): RequestConfiguration.PublisherPrivacyPersonalizationState
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
fun GADAdSize.toCGRectCValue(): CValue<CGRect>
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
fun AdSize.toCommon(): AdSize
fun RequestConfiguration.toCommon(): RequestConfiguration
fun RequestConfiguration.PublisherPrivacyPersonalizationState.toCommon(): RequestConfiguration.PublisherPrivacyPersonalizationState
fun GADAdSize.toCommon(): AdSize
+
+
+
+
+
+
+
+
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/to-android.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/to-android.html new file mode 100644 index 0000000..bc546f6 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/to-android.html @@ -0,0 +1,82 @@ + + + + + toAndroid + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

toAndroid

+
+
+
+
fun AdSize.toAndroid(): AdSize
fun RequestConfiguration.toAndroid(): RequestConfiguration
fun RequestConfiguration.PublisherPrivacyPersonalizationState.toAndroid(): RequestConfiguration.PublisherPrivacyPersonalizationState
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/to-c-g-rect-c-value.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/to-c-g-rect-c-value.html new file mode 100644 index 0000000..57958f9 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/to-c-g-rect-c-value.html @@ -0,0 +1,82 @@ + + + + + toCGRectCValue + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

toCGRectCValue

+
+
+
+
fun GADAdSize.toCGRectCValue(): CValue<CGRect>
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/to-common.html b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/to-common.html new file mode 100644 index 0000000..b253f28 --- /dev/null +++ b/docs/basic-ads/basic-ads/app.lexilabs.basic.ads/to-common.html @@ -0,0 +1,83 @@ + + + + + toCommon + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

toCommon

+
+
+
+
fun AdSize.toCommon(): AdSize
fun RequestConfiguration.toCommon(): RequestConfiguration
fun RequestConfiguration.PublisherPrivacyPersonalizationState.toCommon(): RequestConfiguration.PublisherPrivacyPersonalizationState
fun GADAdSize.toCommon(): AdSize
+
+ +
+
+
+ + diff --git a/docs/basic-ads/basic-ads/package-list b/docs/basic-ads/basic-ads/package-list new file mode 100644 index 0000000..bb9075d --- /dev/null +++ b/docs/basic-ads/basic-ads/package-list @@ -0,0 +1,94 @@ +$dokka.format:html-v1 +$dokka.linkExtension:html +$dokka.location:app.lexilabs.basic.ads////PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/index.html +$dokka.location:app.lexilabs.basic.ads//BannerAd/#kotlin.String#app.lexilabs.basic.ads.AdSize/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-banner-ad.html +$dokka.location:app.lexilabs.basic.ads//InterstitialAd/#kotlin.Any?#kotlin.String#kotlin.Function0[kotlin.Unit]/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-interstitial-ad.html +$dokka.location:app.lexilabs.basic.ads//RewardedAd/#kotlin.Any?#kotlin.String#kotlin.Function0[kotlin.Unit]#kotlin.Function0[kotlin.Unit]/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-rewarded-ad.html +$dokka.location:app.lexilabs.basic.ads//RewardedInterstitialAd/#kotlin.Any?#kotlin.String#kotlin.Function0[kotlin.Unit]#kotlin.Function0[kotlin.Unit]/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-rewarded-interstitial-ad.html +$dokka.location:app.lexilabs.basic.ads//toAndroid/app.lexilabs.basic.ads.AdSize#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/to-android.html +$dokka.location:app.lexilabs.basic.ads//toAndroid/app.lexilabs.basic.ads.RequestConfiguration#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/to-android.html +$dokka.location:app.lexilabs.basic.ads//toAndroid/app.lexilabs.basic.ads.RequestConfiguration.PublisherPrivacyPersonalizationState#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/to-android.html +$dokka.location:app.lexilabs.basic.ads//toCGRectCValue/app.lexilabs.basic.ads.AdSize#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/to-c-g-rect-c-value.html +$dokka.location:app.lexilabs.basic.ads//toCGRectCValue/cocoapods.Google_Mobile_Ads_SDK.GADAdSize#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/to-c-g-rect-c-value.html +$dokka.location:app.lexilabs.basic.ads//toCommon/cocoapods.Google_Mobile_Ads_SDK.GADAdSize#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/to-common.html +$dokka.location:app.lexilabs.basic.ads//toCommon/com.google.android.gms.ads.AdSize#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/to-common.html +$dokka.location:app.lexilabs.basic.ads//toCommon/com.google.android.gms.ads.RequestConfiguration#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/to-common.html +$dokka.location:app.lexilabs.basic.ads//toCommon/com.google.android.gms.ads.RequestConfiguration.PublisherPrivacyPersonalizationState#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/to-common.html +$dokka.location:app.lexilabs.basic.ads/AdError///PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-ad-error/index.html +$dokka.location:app.lexilabs.basic.ads/AdError/AdError/#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-ad-error/-ad-error.html +$dokka.location:app.lexilabs.basic.ads/AdLoader///PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-ad-loader/index.html +$dokka.location:app.lexilabs.basic.ads/AdLoader/AdLoader/#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-ad-loader/-ad-loader.html +$dokka.location:app.lexilabs.basic.ads/AdLoader/loadInterstitialAd/#kotlin.Any?#kotlin.String#kotlin.Function0[kotlin.Unit]/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-ad-loader/load-interstitial-ad.html +$dokka.location:app.lexilabs.basic.ads/AdLoader/loadRewardedAd/#kotlin.Any?#kotlin.String#kotlin.Function0[kotlin.Unit]/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-ad-loader/load-rewarded-ad.html +$dokka.location:app.lexilabs.basic.ads/AdLoader/loadRewardedInterstitialAd/#kotlin.Any?#kotlin.String#kotlin.Function0[kotlin.Unit]/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-ad-loader/load-rewarded-interstitial-ad.html +$dokka.location:app.lexilabs.basic.ads/AdLoader/requestAd/#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-ad-loader/request-ad.html +$dokka.location:app.lexilabs.basic.ads/AdLoader/showInterstitialAd/#kotlin.Any?#kotlin.Function0[kotlin.Unit]/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-ad-loader/show-interstitial-ad.html +$dokka.location:app.lexilabs.basic.ads/AdLoader/showRewardedAd/#kotlin.Any?#kotlin.Function0[kotlin.Unit]#kotlin.Function0[kotlin.Unit]/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-ad-loader/show-rewarded-ad.html +$dokka.location:app.lexilabs.basic.ads/AdLoader/showRewardedInterstitialAd/#kotlin.Any?#kotlin.Function0[kotlin.Unit]#kotlin.Function0[kotlin.Unit]/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-ad-loader/show-rewarded-interstitial-ad.html +$dokka.location:app.lexilabs.basic.ads/AdRequest///PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-ad-request/index.html +$dokka.location:app.lexilabs.basic.ads/AdSize.Companion///PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/index.html +$dokka.location:app.lexilabs.basic.ads/AdSize.Companion/AUTO_HEIGHT/#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-a-u-t-o_-h-e-i-g-h-t.html +$dokka.location:app.lexilabs.basic.ads/AdSize.Companion/BANNER/#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-b-a-n-n-e-r.html +$dokka.location:app.lexilabs.basic.ads/AdSize.Companion/FLUID/#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-f-l-u-i-d.html +$dokka.location:app.lexilabs.basic.ads/AdSize.Companion/FULL_BANNER/#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-f-u-l-l_-b-a-n-n-e-r.html +$dokka.location:app.lexilabs.basic.ads/AdSize.Companion/FULL_WIDTH/#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-f-u-l-l_-w-i-d-t-h.html +$dokka.location:app.lexilabs.basic.ads/AdSize.Companion/INVALID/#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-i-n-v-a-l-i-d.html +$dokka.location:app.lexilabs.basic.ads/AdSize.Companion/LARGE_BANNER/#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-l-a-r-g-e_-b-a-n-n-e-r.html +$dokka.location:app.lexilabs.basic.ads/AdSize.Companion/LEADERBOARD/#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-l-e-a-d-e-r-b-o-a-r-d.html +$dokka.location:app.lexilabs.basic.ads/AdSize.Companion/MEDIUM_RECTANGLE/#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-m-e-d-i-u-m_-r-e-c-t-a-n-g-l-e.html +$dokka.location:app.lexilabs.basic.ads/AdSize.Companion/SEARCH/#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-s-e-a-r-c-h.html +$dokka.location:app.lexilabs.basic.ads/AdSize.Companion/WIDE_SKYSCRAPER/#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-ad-size/-companion/-w-i-d-e_-s-k-y-s-c-r-a-p-e-r.html +$dokka.location:app.lexilabs.basic.ads/AdSize///PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-ad-size/index.html +$dokka.location:app.lexilabs.basic.ads/AdSize/AdSize/#kotlin.Int#kotlin.Int/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-ad-size/-ad-size.html +$dokka.location:app.lexilabs.basic.ads/AdSize/height/#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-ad-size/height.html +$dokka.location:app.lexilabs.basic.ads/AdSize/toIos/#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-ad-size/to-ios.html +$dokka.location:app.lexilabs.basic.ads/AdSize/width/#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-ad-size/width.html +$dokka.location:app.lexilabs.basic.ads/AdUnitId///PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-ad-unit-id/index.html +$dokka.location:app.lexilabs.basic.ads/AdUnitId/BANNER_DEFAULT/#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-ad-unit-id/-b-a-n-n-e-r_-d-e-f-a-u-l-t.html +$dokka.location:app.lexilabs.basic.ads/AdUnitId/INTERSTITIAL_DEFAULT/#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-ad-unit-id/-i-n-t-e-r-s-t-i-t-i-a-l_-d-e-f-a-u-l-t.html +$dokka.location:app.lexilabs.basic.ads/AdUnitId/REWARDED_DEFAULT/#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-ad-unit-id/-r-e-w-a-r-d-e-d_-d-e-f-a-u-l-t.html +$dokka.location:app.lexilabs.basic.ads/AdUnitId/REWARDED_INTERSTITIAL_DEFAULT/#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-ad-unit-id/-r-e-w-a-r-d-e-d_-i-n-t-e-r-s-t-i-t-i-a-l_-d-e-f-a-u-l-t.html +$dokka.location:app.lexilabs.basic.ads/AdUnitId/autoSelect/#kotlin.String?#kotlin.String?/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-ad-unit-id/auto-select.html +$dokka.location:app.lexilabs.basic.ads/AdView///PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-ad-view/index.html +$dokka.location:app.lexilabs.basic.ads/BasicAds///PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-basic-ads/index.html +$dokka.location:app.lexilabs.basic.ads/BasicAds/configuration/#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-basic-ads/configuration.html +$dokka.location:app.lexilabs.basic.ads/BasicAds/disableMediationAdapterInitialization/#kotlin.Any?/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-basic-ads/disable-mediation-adapter-initialization.html +$dokka.location:app.lexilabs.basic.ads/BasicAds/errorDomain/#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-basic-ads/error-domain.html +$dokka.location:app.lexilabs.basic.ads/BasicAds/initialize/#kotlin.Any?/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-basic-ads/initialize.html +$dokka.location:app.lexilabs.basic.ads/BasicAds/initialized/#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-basic-ads/initialized.html +$dokka.location:app.lexilabs.basic.ads/BasicAds/openDebugMenu/#kotlin.Any?#kotlin.String/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-basic-ads/open-debug-menu.html +$dokka.location:app.lexilabs.basic.ads/BasicAds/setAppMuted/#kotlin.Boolean/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-basic-ads/set-app-muted.html +$dokka.location:app.lexilabs.basic.ads/BasicAds/setAppVolume/#kotlin.Float/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-basic-ads/set-app-volume.html +$dokka.location:app.lexilabs.basic.ads/BasicAds/version/#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-basic-ads/version.html +$dokka.location:app.lexilabs.basic.ads/DependsOnGoogleMobileAds///PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-depends-on-google-mobile-ads/index.html +$dokka.location:app.lexilabs.basic.ads/ExperimentalBasicAds///PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-experimental-basic-ads/index.html +$dokka.location:app.lexilabs.basic.ads/RequestConfiguration.Companion///PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/index.html +$dokka.location:app.lexilabs.basic.ads/RequestConfiguration.Companion/MAX_AD_CONTENT_RATING_G/#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-m-a-x_-a-d_-c-o-n-t-e-n-t_-r-a-t-i-n-g_-g.html +$dokka.location:app.lexilabs.basic.ads/RequestConfiguration.Companion/MAX_AD_CONTENT_RATING_MA/#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-m-a-x_-a-d_-c-o-n-t-e-n-t_-r-a-t-i-n-g_-m-a.html +$dokka.location:app.lexilabs.basic.ads/RequestConfiguration.Companion/MAX_AD_CONTENT_RATING_PG/#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-m-a-x_-a-d_-c-o-n-t-e-n-t_-r-a-t-i-n-g_-p-g.html +$dokka.location:app.lexilabs.basic.ads/RequestConfiguration.Companion/MAX_AD_CONTENT_RATING_T/#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-m-a-x_-a-d_-c-o-n-t-e-n-t_-r-a-t-i-n-g_-t.html +$dokka.location:app.lexilabs.basic.ads/RequestConfiguration.Companion/MAX_AD_CONTENT_RATING_UNSPECIFIED/#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-m-a-x_-a-d_-c-o-n-t-e-n-t_-r-a-t-i-n-g_-u-n-s-p-e-c-i-f-i-e-d.html +$dokka.location:app.lexilabs.basic.ads/RequestConfiguration.Companion/TAG_FOR_CHILD_DIRECTED_TREATMENT_FALSE/#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-t-a-g_-f-o-r_-c-h-i-l-d_-d-i-r-e-c-t-e-d_-t-r-e-a-t-m-e-n-t_-f-a-l-s-e.html +$dokka.location:app.lexilabs.basic.ads/RequestConfiguration.Companion/TAG_FOR_CHILD_DIRECTED_TREATMENT_TRUE/#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-t-a-g_-f-o-r_-c-h-i-l-d_-d-i-r-e-c-t-e-d_-t-r-e-a-t-m-e-n-t_-t-r-u-e.html +$dokka.location:app.lexilabs.basic.ads/RequestConfiguration.Companion/TAG_FOR_CHILD_DIRECTED_TREATMENT_UNSPECIFIED/#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-t-a-g_-f-o-r_-c-h-i-l-d_-d-i-r-e-c-t-e-d_-t-r-e-a-t-m-e-n-t_-u-n-s-p-e-c-i-f-i-e-d.html +$dokka.location:app.lexilabs.basic.ads/RequestConfiguration.Companion/TAG_FOR_UNDER_AGE_OF_CONSENT_FALSE/#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-t-a-g_-f-o-r_-u-n-d-e-r_-a-g-e_-o-f_-c-o-n-s-e-n-t_-f-a-l-s-e.html +$dokka.location:app.lexilabs.basic.ads/RequestConfiguration.Companion/TAG_FOR_UNDER_AGE_OF_CONSENT_TRUE/#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-t-a-g_-f-o-r_-u-n-d-e-r_-a-g-e_-o-f_-c-o-n-s-e-n-t_-t-r-u-e.html +$dokka.location:app.lexilabs.basic.ads/RequestConfiguration.Companion/TAG_FOR_UNDER_AGE_OF_CONSENT_UNSPECIFIED/#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-request-configuration/-companion/-t-a-g_-f-o-r_-u-n-d-e-r_-a-g-e_-o-f_-c-o-n-s-e-n-t_-u-n-s-p-e-c-i-f-i-e-d.html +$dokka.location:app.lexilabs.basic.ads/RequestConfiguration.PublisherPrivacyPersonalizationState.Companion///PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-request-configuration/-publisher-privacy-personalization-state/-companion/index.html +$dokka.location:app.lexilabs.basic.ads/RequestConfiguration.PublisherPrivacyPersonalizationState.Companion/fromInt/#kotlin.Int/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-request-configuration/-publisher-privacy-personalization-state/-companion/from-int.html +$dokka.location:app.lexilabs.basic.ads/RequestConfiguration.PublisherPrivacyPersonalizationState.DEFAULT///PointingToDeclaration/{"org.jetbrains.dokka.links.EnumEntryDRIExtra":{"key":"org.jetbrains.dokka.links.EnumEntryDRIExtra"}}basic-ads/app.lexilabs.basic.ads/-request-configuration/-publisher-privacy-personalization-state/-d-e-f-a-u-l-t/index.html +$dokka.location:app.lexilabs.basic.ads/RequestConfiguration.PublisherPrivacyPersonalizationState.DISABLED///PointingToDeclaration/{"org.jetbrains.dokka.links.EnumEntryDRIExtra":{"key":"org.jetbrains.dokka.links.EnumEntryDRIExtra"}}basic-ads/app.lexilabs.basic.ads/-request-configuration/-publisher-privacy-personalization-state/-d-i-s-a-b-l-e-d/index.html +$dokka.location:app.lexilabs.basic.ads/RequestConfiguration.PublisherPrivacyPersonalizationState.ENABLED///PointingToDeclaration/{"org.jetbrains.dokka.links.EnumEntryDRIExtra":{"key":"org.jetbrains.dokka.links.EnumEntryDRIExtra"}}basic-ads/app.lexilabs.basic.ads/-request-configuration/-publisher-privacy-personalization-state/-e-n-a-b-l-e-d/index.html +$dokka.location:app.lexilabs.basic.ads/RequestConfiguration.PublisherPrivacyPersonalizationState///PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-request-configuration/-publisher-privacy-personalization-state/index.html +$dokka.location:app.lexilabs.basic.ads/RequestConfiguration.PublisherPrivacyPersonalizationState/entries/#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-request-configuration/-publisher-privacy-personalization-state/entries.html +$dokka.location:app.lexilabs.basic.ads/RequestConfiguration.PublisherPrivacyPersonalizationState/valueOf/#kotlin.String/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-request-configuration/-publisher-privacy-personalization-state/value-of.html +$dokka.location:app.lexilabs.basic.ads/RequestConfiguration.PublisherPrivacyPersonalizationState/values/#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-request-configuration/-publisher-privacy-personalization-state/values.html +$dokka.location:app.lexilabs.basic.ads/RequestConfiguration///PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-request-configuration/index.html +$dokka.location:app.lexilabs.basic.ads/RequestConfiguration/RequestConfiguration/#kotlin.String?#app.lexilabs.basic.ads.RequestConfiguration.PublisherPrivacyPersonalizationState#kotlin.Int#kotlin.Int#kotlin.collections.List[kotlin.String?]?/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-request-configuration/-request-configuration.html +$dokka.location:app.lexilabs.basic.ads/RequestConfiguration/maxAdContentRating/#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-request-configuration/max-ad-content-rating.html +$dokka.location:app.lexilabs.basic.ads/RequestConfiguration/publisherPrivacyPersonalizationState/#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-request-configuration/publisher-privacy-personalization-state.html +$dokka.location:app.lexilabs.basic.ads/RequestConfiguration/tagForChildDirectedTreatment/#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-request-configuration/tag-for-child-directed-treatment.html +$dokka.location:app.lexilabs.basic.ads/RequestConfiguration/tagForUnderAgeOfConsent/#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-request-configuration/tag-for-under-age-of-consent.html +$dokka.location:app.lexilabs.basic.ads/RequestConfiguration/testDeviceIds/#/PointingToDeclaration/basic-ads/app.lexilabs.basic.ads/-request-configuration/test-device-ids.html +app.lexilabs.basic.ads + diff --git a/docs/basic-ads/images/anchor-copy-button.svg b/docs/basic-ads/images/anchor-copy-button.svg new file mode 100644 index 0000000..19c1fa3 --- /dev/null +++ b/docs/basic-ads/images/anchor-copy-button.svg @@ -0,0 +1,8 @@ + + + + + + diff --git a/docs/basic-ads/images/arrow_down.svg b/docs/basic-ads/images/arrow_down.svg new file mode 100644 index 0000000..639aaf1 --- /dev/null +++ b/docs/basic-ads/images/arrow_down.svg @@ -0,0 +1,7 @@ + + + + + diff --git a/docs/basic-ads/images/burger.svg b/docs/basic-ads/images/burger.svg new file mode 100644 index 0000000..fcca732 --- /dev/null +++ b/docs/basic-ads/images/burger.svg @@ -0,0 +1,9 @@ + + + + + + + diff --git a/docs/basic-ads/images/copy-icon.svg b/docs/basic-ads/images/copy-icon.svg new file mode 100644 index 0000000..2cb02ec --- /dev/null +++ b/docs/basic-ads/images/copy-icon.svg @@ -0,0 +1,7 @@ + + + + + diff --git a/docs/basic-ads/images/copy-successful-icon.svg b/docs/basic-ads/images/copy-successful-icon.svg new file mode 100644 index 0000000..c4b9538 --- /dev/null +++ b/docs/basic-ads/images/copy-successful-icon.svg @@ -0,0 +1,7 @@ + + + + + diff --git a/docs/basic-ads/images/footer-go-to-link.svg b/docs/basic-ads/images/footer-go-to-link.svg new file mode 100644 index 0000000..a87add7 --- /dev/null +++ b/docs/basic-ads/images/footer-go-to-link.svg @@ -0,0 +1,7 @@ + + + + + diff --git a/docs/basic-ads/images/go-to-top-icon.svg b/docs/basic-ads/images/go-to-top-icon.svg new file mode 100644 index 0000000..abc3d1c --- /dev/null +++ b/docs/basic-ads/images/go-to-top-icon.svg @@ -0,0 +1,8 @@ + + + + + + diff --git a/docs/basic-ads/images/homepage.svg b/docs/basic-ads/images/homepage.svg new file mode 100644 index 0000000..e3c83b1 --- /dev/null +++ b/docs/basic-ads/images/homepage.svg @@ -0,0 +1,3 @@ + + + diff --git a/docs/basic-ads/images/logo-icon.svg b/docs/basic-ads/images/logo-icon.svg new file mode 100644 index 0000000..e42f957 --- /dev/null +++ b/docs/basic-ads/images/logo-icon.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/docs/basic-ads/images/nav-icons/abstract-class-kotlin.svg b/docs/basic-ads/images/nav-icons/abstract-class-kotlin.svg new file mode 100644 index 0000000..19d6148 --- /dev/null +++ b/docs/basic-ads/images/nav-icons/abstract-class-kotlin.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/basic-ads/images/nav-icons/abstract-class.svg b/docs/basic-ads/images/nav-icons/abstract-class.svg new file mode 100644 index 0000000..6018203 --- /dev/null +++ b/docs/basic-ads/images/nav-icons/abstract-class.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/docs/basic-ads/images/nav-icons/annotation-kotlin.svg b/docs/basic-ads/images/nav-icons/annotation-kotlin.svg new file mode 100644 index 0000000..b90f508 --- /dev/null +++ b/docs/basic-ads/images/nav-icons/annotation-kotlin.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/docs/basic-ads/images/nav-icons/annotation.svg b/docs/basic-ads/images/nav-icons/annotation.svg new file mode 100644 index 0000000..b80c54b --- /dev/null +++ b/docs/basic-ads/images/nav-icons/annotation.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/docs/basic-ads/images/nav-icons/class-kotlin.svg b/docs/basic-ads/images/nav-icons/class-kotlin.svg new file mode 100644 index 0000000..797a242 --- /dev/null +++ b/docs/basic-ads/images/nav-icons/class-kotlin.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/docs/basic-ads/images/nav-icons/class.svg b/docs/basic-ads/images/nav-icons/class.svg new file mode 100644 index 0000000..3f1ad16 --- /dev/null +++ b/docs/basic-ads/images/nav-icons/class.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/docs/basic-ads/images/nav-icons/enum-kotlin.svg b/docs/basic-ads/images/nav-icons/enum-kotlin.svg new file mode 100644 index 0000000..775a7cc --- /dev/null +++ b/docs/basic-ads/images/nav-icons/enum-kotlin.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/docs/basic-ads/images/nav-icons/enum.svg b/docs/basic-ads/images/nav-icons/enum.svg new file mode 100644 index 0000000..fa7f247 --- /dev/null +++ b/docs/basic-ads/images/nav-icons/enum.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/docs/basic-ads/images/nav-icons/exception-class.svg b/docs/basic-ads/images/nav-icons/exception-class.svg new file mode 100644 index 0000000..c0b2bde --- /dev/null +++ b/docs/basic-ads/images/nav-icons/exception-class.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/docs/basic-ads/images/nav-icons/field-value.svg b/docs/basic-ads/images/nav-icons/field-value.svg new file mode 100644 index 0000000..2771ee5 --- /dev/null +++ b/docs/basic-ads/images/nav-icons/field-value.svg @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/docs/basic-ads/images/nav-icons/field-variable.svg b/docs/basic-ads/images/nav-icons/field-variable.svg new file mode 100644 index 0000000..e2d2bbd --- /dev/null +++ b/docs/basic-ads/images/nav-icons/field-variable.svg @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/docs/basic-ads/images/nav-icons/function.svg b/docs/basic-ads/images/nav-icons/function.svg new file mode 100644 index 0000000..f0da64a --- /dev/null +++ b/docs/basic-ads/images/nav-icons/function.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/docs/basic-ads/images/nav-icons/interface-kotlin.svg b/docs/basic-ads/images/nav-icons/interface-kotlin.svg new file mode 100644 index 0000000..5e16326 --- /dev/null +++ b/docs/basic-ads/images/nav-icons/interface-kotlin.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/docs/basic-ads/images/nav-icons/interface.svg b/docs/basic-ads/images/nav-icons/interface.svg new file mode 100644 index 0000000..32063ba --- /dev/null +++ b/docs/basic-ads/images/nav-icons/interface.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/docs/basic-ads/images/nav-icons/object.svg b/docs/basic-ads/images/nav-icons/object.svg new file mode 100644 index 0000000..31f0ee3 --- /dev/null +++ b/docs/basic-ads/images/nav-icons/object.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/docs/basic-ads/images/nav-icons/typealias-kotlin.svg b/docs/basic-ads/images/nav-icons/typealias-kotlin.svg new file mode 100644 index 0000000..f4bb238 --- /dev/null +++ b/docs/basic-ads/images/nav-icons/typealias-kotlin.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/docs/basic-ads/images/theme-toggle.svg b/docs/basic-ads/images/theme-toggle.svg new file mode 100644 index 0000000..df86202 --- /dev/null +++ b/docs/basic-ads/images/theme-toggle.svg @@ -0,0 +1,7 @@ + + + + + diff --git a/docs/basic-ads/index.html b/docs/basic-ads/index.html new file mode 100644 index 0000000..cdd4d0c --- /dev/null +++ b/docs/basic-ads/index.html @@ -0,0 +1,103 @@ + + + + + basic-ads + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

basic-ads

+
+

Packages

+
+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
common
+
ios
+
+
+
+
+
+
+
+
+ +
+
+
+ + diff --git a/docs/basic-ads/navigation.html b/docs/basic-ads/navigation.html new file mode 100644 index 0000000..029db28 --- /dev/null +++ b/docs/basic-ads/navigation.html @@ -0,0 +1,79 @@ + + diff --git a/docs/basic-ads/scripts/clipboard.js b/docs/basic-ads/scripts/clipboard.js new file mode 100644 index 0000000..7a4f33c --- /dev/null +++ b/docs/basic-ads/scripts/clipboard.js @@ -0,0 +1,56 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +window.addEventListener('load', () => { + document.querySelectorAll('span.copy-icon').forEach(element => { + element.addEventListener('click', (el) => copyElementsContentToClipboard(element)); + }) + + document.querySelectorAll('span.anchor-icon').forEach(element => { + element.addEventListener('click', (el) => { + if(element.hasAttribute('pointing-to')){ + const location = hrefWithoutCurrentlyUsedAnchor() + '#' + element.getAttribute('pointing-to') + copyTextToClipboard(element, location) + } + }); + }) +}) + +const copyElementsContentToClipboard = (element) => { + const selection = window.getSelection(); + const range = document.createRange(); + range.selectNodeContents(element.parentNode.parentNode); + selection.removeAllRanges(); + selection.addRange(range); + + copyAndShowPopup(element, () => selection.removeAllRanges()) +} + +const copyTextToClipboard = (element, text) => { + var textarea = document.createElement("textarea"); + textarea.textContent = text; + textarea.style.position = "fixed"; + document.body.appendChild(textarea); + textarea.select(); + + copyAndShowPopup(element, () => document.body.removeChild(textarea)) +} + +const copyAndShowPopup = (element, after) => { + try { + document.execCommand('copy'); + element.nextElementSibling.classList.add('active-popup'); + setTimeout(() => { + element.nextElementSibling.classList.remove('active-popup'); + }, 1200); + } catch (e) { + console.error('Failed to write to clipboard:', e) + } + finally { + if(after) after() + } +} + +const hrefWithoutCurrentlyUsedAnchor = () => window.location.href.split('#')[0] + diff --git a/docs/basic-ads/scripts/main.js b/docs/basic-ads/scripts/main.js new file mode 100644 index 0000000..ba6c347 --- /dev/null +++ b/docs/basic-ads/scripts/main.js @@ -0,0 +1,44 @@ +(()=>{var e={8527:e=>{e.exports=''},5570:e=>{e.exports=''},107:e=>{e.exports=''},7224:e=>{e.exports=''},538:e=>{e.exports=''},1924:(e,n,t)=>{"use strict";var r=t(210),o=t(5559),i=o(r("String.prototype.indexOf"));e.exports=function(e,n){var t=r(e,!!n);return"function"==typeof t&&i(e,".prototype.")>-1?o(t):t}},5559:(e,n,t)=>{"use strict";var r=t(8612),o=t(210),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),l=o("%Reflect.apply%",!0)||r.call(a,i),c=o("%Object.getOwnPropertyDescriptor%",!0),u=o("%Object.defineProperty%",!0),s=o("%Math.max%");if(u)try{u({},"a",{value:1})}catch(e){u=null}e.exports=function(e){var n=l(r,a,arguments);if(c&&u){var t=c(n,"length");t.configurable&&u(n,"length",{value:1+s(0,e.length-(arguments.length-1))})}return n};var f=function(){return l(r,i,arguments)};u?u(e.exports,"apply",{value:f}):e.exports.apply=f},4184:(e,n)=>{var t; +/*! + Copyright (c) 2018 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],n=0;n{"use strict";e.exports=function(e,n){var t=this,r=t.constructor;return t.options=Object.assign({storeInstancesGlobally:!0},n||{}),t.callbacks={},t.directMap={},t.sequenceLevels={},t.resetTimer=null,t.ignoreNextKeyup=!1,t.ignoreNextKeypress=!1,t.nextExpectedAction=!1,t.element=e,t.addEvents(),t.options.storeInstancesGlobally&&r.instances.push(t),t},e.exports.prototype.bind=t(2207),e.exports.prototype.bindMultiple=t(3396),e.exports.prototype.unbind=t(9208),e.exports.prototype.trigger=t(9855),e.exports.prototype.reset=t(6214),e.exports.prototype.stopCallback=t(3450),e.exports.prototype.handleKey=t(3067),e.exports.prototype.addEvents=t(718),e.exports.prototype.bindSingle=t(8763),e.exports.prototype.getKeyInfo=t(5825),e.exports.prototype.pickBestAction=t(8608),e.exports.prototype.getReverseMap=t(3956),e.exports.prototype.getMatches=t(3373),e.exports.prototype.resetSequences=t(3346),e.exports.prototype.fireCallback=t(2684),e.exports.prototype.bindSequence=t(7103),e.exports.prototype.resetSequenceTimer=t(7309),e.exports.prototype.detach=t(7554),e.exports.instances=[],e.exports.reset=t(1822),e.exports.REVERSE_MAP=null},718:(e,n,t)=>{"use strict";e.exports=function(){var e=this,n=t(4323),r=e.element;e.eventHandler=t(9646).bind(e),n(r,"keypress",e.eventHandler),n(r,"keydown",e.eventHandler),n(r,"keyup",e.eventHandler)}},2207:e=>{"use strict";e.exports=function(e,n,t){return e=e instanceof Array?e:[e],this.bindMultiple(e,n,t),this}},3396:e=>{"use strict";e.exports=function(e,n,t){for(var r=0;r{"use strict";e.exports=function(e,n,r,o){var i=this;function a(n){return function(){i.nextExpectedAction=n,++i.sequenceLevels[e],i.resetSequenceTimer()}}function l(n){var a;i.fireCallback(r,n,e),"keyup"!==o&&(a=t(6770),i.ignoreNextKeyup=a(n)),setTimeout((function(){i.resetSequences()}),10)}i.sequenceLevels[e]=0;for(var c=0;c{"use strict";e.exports=function(e,n,t,r,o){var i=this;i.directMap[e+":"+t]=n;var a,l=(e=e.replace(/\s+/g," ")).split(" ");l.length>1?i.bindSequence(e,l,n,t):(a=i.getKeyInfo(e,t),i.callbacks[a.key]=i.callbacks[a.key]||[],i.getMatches(a.key,a.modifiers,{type:a.action},r,e,o),i.callbacks[a.key][r?"unshift":"push"]({callback:n,modifiers:a.modifiers,action:a.action,seq:r,level:o,combo:e}))}},7554:(e,n,t)=>{var r=t(4323).off;e.exports=function(){var e=this,n=e.element;r(n,"keypress",e.eventHandler),r(n,"keydown",e.eventHandler),r(n,"keyup",e.eventHandler)}},4323:e=>{function n(e,n,t,r){return!e.addEventListener&&(n="on"+n),(e.addEventListener||e.attachEvent).call(e,n,t,r),t}e.exports=n,e.exports.on=n,e.exports.off=function(e,n,t,r){return!e.removeEventListener&&(n="on"+n),(e.removeEventListener||e.detachEvent).call(e,n,t,r),t}},2684:(e,n,t)=>{"use strict";e.exports=function(e,n,r,o){this.stopCallback(n,n.target||n.srcElement,r,o)||!1===e(n,r)&&(t(1350)(n),t(6103)(n))}},5825:(e,n,t)=>{"use strict";e.exports=function(e,n){var r,o,i,a,l,c,u=[];for(r=t(4520)(e),a=t(7549),l=t(5355),c=t(8581),i=0;i{"use strict";e.exports=function(e,n,r,o,i,a){var l,c,u,s,f=this,p=[],d=r.type;"keypress"!==d||r.code&&"Arrow"===r.code.slice(0,5)||(f.callbacks["any-character"]||[]).forEach((function(e){p.push(e)}));if(!f.callbacks[e])return p;for(u=t(8581),"keyup"===d&&u(e)&&(n=[e]),l=0;l{"use strict";e.exports=function(){var e,n=this.constructor;if(!n.REVERSE_MAP)for(var r in n.REVERSE_MAP={},e=t(4766))r>95&&r<112||e.hasOwnProperty(r)&&(n.REVERSE_MAP[e[r]]=r);return n.REVERSE_MAP}},3067:(e,n,t)=>{"use strict";e.exports=function(e,n,r){var o,i,a,l,c=this,u={},s=0,f=!1;for(o=c.getMatches(e,n,r),i=0;i{"use strict";e.exports=function(e){var n,r=this;"number"!=typeof e.which&&(e.which=e.keyCode);var o=t(6770)(e);void 0!==o&&("keyup"!==e.type||r.ignoreNextKeyup!==o?(n=t(4610),r.handleKey(o,n(e),e)):r.ignoreNextKeyup=!1)}},5532:e=>{"use strict";e.exports=function(e,n){return e.sort().join(",")===n.sort().join(",")}},8608:e=>{"use strict";e.exports=function(e,n,t){return t||(t=this.getReverseMap()[e]?"keydown":"keypress"),"keypress"===t&&n.length&&(t="keydown"),t}},6214:e=>{"use strict";e.exports=function(){return this.callbacks={},this.directMap={},this}},7309:e=>{"use strict";e.exports=function(){var e=this;clearTimeout(e.resetTimer),e.resetTimer=setTimeout((function(){e.resetSequences()}),1e3)}},3346:e=>{"use strict";e.exports=function(e){var n=this;e=e||{};var t,r=!1;for(t in n.sequenceLevels)e[t]?r=!0:n.sequenceLevels[t]=0;r||(n.nextExpectedAction=!1)}},3450:e=>{"use strict";e.exports=function(e,n){if((" "+n.className+" ").indexOf(" combokeys ")>-1)return!1;var t=n.tagName.toLowerCase();return"input"===t||"select"===t||"textarea"===t||n.isContentEditable}},9855:e=>{"use strict";e.exports=function(e,n){return this.directMap[e+":"+n]&&this.directMap[e+":"+n]({},e),this}},9208:e=>{"use strict";e.exports=function(e,n){return this.bind(e,(function(){}),n)}},1822:e=>{"use strict";e.exports=function(){this.instances.forEach((function(e){e.reset()}))}},6770:(e,n,t)=>{"use strict";e.exports=function(e){var n,r;if(n=t(4766),r=t(5295),"keypress"===e.type){var o=String.fromCharCode(e.which);return e.shiftKey||(o=o.toLowerCase()),o}return void 0!==n[e.which]?n[e.which]:void 0!==r[e.which]?r[e.which]:String.fromCharCode(e.which).toLowerCase()}},4610:e=>{"use strict";e.exports=function(e){var n=[];return e.shiftKey&&n.push("shift"),e.altKey&&n.push("alt"),e.ctrlKey&&n.push("ctrl"),e.metaKey&&n.push("meta"),n}},8581:e=>{"use strict";e.exports=function(e){return"shift"===e||"ctrl"===e||"alt"===e||"meta"===e}},4520:e=>{"use strict";e.exports=function(e){return"+"===e?["+"]:e.split("+")}},1350:e=>{"use strict";e.exports=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1}},5355:e=>{"use strict";e.exports={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"}},7549:e=>{"use strict";e.exports={option:"alt",command:"meta",return:"enter",escape:"esc",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"}},5295:e=>{"use strict";e.exports={106:"*",107:"plus",109:"minus",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"}},4766:e=>{"use strict";e.exports={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",173:"minus",187:"plus",189:"minus",224:"meta"};for(var n=1;n<20;++n)e.exports[111+n]="f"+n;for(n=0;n<=9;++n)e.exports[n+96]=n},6103:e=>{"use strict";e.exports=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}},3362:()=>{var e;!function(){var e=Math.PI,n=2*e,t=e/180,r=document.createElement("div");document.head.appendChild(r);var o=self.ConicGradient=function(e){o.all.push(this),e=e||{},this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.repeating=!!e.repeating,this.size=e.size||Math.max(innerWidth,innerHeight),this.canvas.width=this.canvas.height=this.size;var n=e.stops;this.stops=(n||"").split(/\s*,(?![^(]*\))\s*/),this.from=0;for(var t=0;t0){var i=this.stops[0].clone();i.pos=0,this.stops.unshift(i)}if(void 0===this.stops[this.stops.length-1].pos)this.stops[this.stops.length-1].pos=1;else if(!this.repeating&&this.stops[this.stops.length-1].pos<1){var a=this.stops[this.stops.length-1].clone();a.pos=1,this.stops.push(a)}if(this.stops.forEach((function(e,n){if(void 0===e.pos){for(var t=n+1;this[t];t++)if(void 0!==this[t].pos){e.pos=this[n-1].pos+(this[t].pos-this[n-1].pos)/(t-n+1);break}}else n>0&&(e.pos=Math.max(e.pos,this[n-1].pos))}),this.stops),this.repeating){var l=(n=this.stops.slice())[n.length-1].pos-n[0].pos;for(t=0;this.stops[this.stops.length-1].pos<1&&t<1e4;t++)for(var c=0;c'},get png(){return this.canvas.toDataURL()},get r(){return Math.sqrt(2)*this.size/2},paint:function(){var e,n,r,o=this.context,i=this.r,a=this.size/2,l=0,c=this.stops[l];o.translate(this.size/2,this.size/2),o.rotate(-90*t),o.rotate(this.from*t),o.translate(-this.size/2,-this.size/2);for(var u=0;u<360;){if(u/360+1e-5>=c.pos){do{e=c,l++,c=this.stops[l]}while(c&&c!=e&&c.pos===e.pos);if(!c)break;var s=e.color+""==c.color+""&&e!=c;n=e.color.map((function(e,n){return c.color[n]-e}))}r=(u/360-e.pos)/(c.pos-e.pos);var f=s?c.color:n.map((function(n,t){var o=n*r+e.color[t];return t<3?255&o:o}));if(o.fillStyle="rgba("+f.join(",")+")",o.beginPath(),o.moveTo(a,a),s)var p=360*(c.pos-e.pos);else p=.5;var d=u*t,h=(d=Math.min(360*t,d))+p*t;h=Math.min(360*t,h+.02),o.arc(a,a,i,d,h),o.closePath(),o.fill(),u+=p}}},o.ColorStop=function(e,t){if(this.gradient=e,t){var r=t.match(/^(.+?)(?:\s+([\d.]+)(%|deg|turn|grad|rad)?)?(?:\s+([\d.]+)(%|deg|turn|grad|rad)?)?\s*$/);if(this.color=o.ColorStop.colorToRGBA(r[1]),r[2]){var i=r[3];"%"==i||"0"===r[2]&&!i?this.pos=r[2]/100:"turn"==i?this.pos=+r[2]:"deg"==i?this.pos=r[2]/360:"grad"==i?this.pos=r[2]/400:"rad"==i&&(this.pos=r[2]/n)}r[4]&&(this.next=new o.ColorStop(e,r[1]+" "+r[4]+r[5]))}},o.ColorStop.prototype={clone:function(){var e=new o.ColorStop(this.gradient);return e.color=this.color,e.pos=this.pos,e},toString:function(){return"rgba("+this.color.join(", ")+") "+100*this.pos+"%"}},o.ColorStop.colorToRGBA=function(e){if(!Array.isArray(e)&&-1==e.indexOf("from")){r.style.color=e;var n=getComputedStyle(r).color.match(/rgba?\(([\d.]+), ([\d.]+), ([\d.]+)(?:, ([\d.]+))?\)/);return n&&(n.shift(),(n=n.map((function(e){return+e})))[3]=isNaN(n[3])?1:n[3]),n||[0,0,0,0]}return e}}(),self.StyleFix&&((e=document.createElement("p")).style.backgroundImage="conic-gradient(white, black)",e.style.backgroundImage=PrefixFree.prefix+"conic-gradient(white, black)",e.style.backgroundImage||StyleFix.register((function(e,n){return e.indexOf("conic-gradient")>-1&&(e=e.replace(/(?:repeating-)?conic-gradient\(\s*((?:\([^()]+\)|[^;()}])+?)\)/g,(function(e,n){return new ConicGradient({stops:n,repeating:e.indexOf("repeating-")>-1})}))),e})))},9662:(e,n,t)=>{var r=t(7854),o=t(614),i=t(6330),a=r.TypeError;e.exports=function(e){if(o(e))return e;throw a(i(e)+" is not a function")}},9483:(e,n,t)=>{var r=t(7854),o=t(4411),i=t(6330),a=r.TypeError;e.exports=function(e){if(o(e))return e;throw a(i(e)+" is not a constructor")}},6077:(e,n,t)=>{var r=t(7854),o=t(614),i=r.String,a=r.TypeError;e.exports=function(e){if("object"==typeof e||o(e))return e;throw a("Can't set "+i(e)+" as a prototype")}},1223:(e,n,t)=>{var r=t(5112),o=t(30),i=t(3070),a=r("unscopables"),l=Array.prototype;null==l[a]&&i.f(l,a,{configurable:!0,value:o(null)}),e.exports=function(e){l[a][e]=!0}},1530:(e,n,t)=>{"use strict";var r=t(8710).charAt;e.exports=function(e,n,t){return n+(t?r(e,n).length:1)}},5787:(e,n,t)=>{var r=t(7854),o=t(7976),i=r.TypeError;e.exports=function(e,n){if(o(n,e))return e;throw i("Incorrect invocation")}},9670:(e,n,t)=>{var r=t(7854),o=t(111),i=r.String,a=r.TypeError;e.exports=function(e){if(o(e))return e;throw a(i(e)+" is not an object")}},7556:(e,n,t)=>{var r=t(7293);e.exports=r((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}))},8533:(e,n,t)=>{"use strict";var r=t(2092).forEach,o=t(9341)("forEach");e.exports=o?[].forEach:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}},8457:(e,n,t)=>{"use strict";var r=t(7854),o=t(9974),i=t(6916),a=t(7908),l=t(3411),c=t(7659),u=t(4411),s=t(6244),f=t(6135),p=t(8554),d=t(1246),h=r.Array;e.exports=function(e){var n=a(e),t=u(this),r=arguments.length,g=r>1?arguments[1]:void 0,v=void 0!==g;v&&(g=o(g,r>2?arguments[2]:void 0));var A,b,m,y,E,_,C=d(n),w=0;if(!C||this==h&&c(C))for(A=s(n),b=t?new this(A):h(A);A>w;w++)_=v?g(n[w],w):n[w],f(b,w,_);else for(E=(y=p(n,C)).next,b=t?new this:[];!(m=i(E,y)).done;w++)_=v?l(y,g,[m.value,w],!0):m.value,f(b,w,_);return b.length=w,b}},1318:(e,n,t)=>{var r=t(5656),o=t(1400),i=t(6244),a=function(e){return function(n,t,a){var l,c=r(n),u=i(c),s=o(a,u);if(e&&t!=t){for(;u>s;)if((l=c[s++])!=l)return!0}else for(;u>s;s++)if((e||s in c)&&c[s]===t)return e||s||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},2092:(e,n,t)=>{var r=t(9974),o=t(1702),i=t(8361),a=t(7908),l=t(6244),c=t(5417),u=o([].push),s=function(e){var n=1==e,t=2==e,o=3==e,s=4==e,f=6==e,p=7==e,d=5==e||f;return function(h,g,v,A){for(var b,m,y=a(h),E=i(y),_=r(g,v),C=l(E),w=0,x=A||c,k=n?x(h,C):t||p?x(h,0):void 0;C>w;w++)if((d||w in E)&&(m=_(b=E[w],w,y),e))if(n)k[w]=m;else if(m)switch(e){case 3:return!0;case 5:return b;case 6:return w;case 2:u(k,b)}else switch(e){case 4:return!1;case 7:u(k,b)}return f?-1:o||s?s:k}};e.exports={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterReject:s(7)}},1194:(e,n,t)=>{var r=t(7293),o=t(5112),i=t(7392),a=o("species");e.exports=function(e){return i>=51||!r((function(){var n=[];return(n.constructor={})[a]=function(){return{foo:1}},1!==n[e](Boolean).foo}))}},9341:(e,n,t)=>{"use strict";var r=t(7293);e.exports=function(e,n){var t=[][e];return!!t&&r((function(){t.call(null,n||function(){throw 1},1)}))}},3671:(e,n,t)=>{var r=t(7854),o=t(9662),i=t(7908),a=t(8361),l=t(6244),c=r.TypeError,u=function(e){return function(n,t,r,u){o(t);var s=i(n),f=a(s),p=l(s),d=e?p-1:0,h=e?-1:1;if(r<2)for(;;){if(d in f){u=f[d],d+=h;break}if(d+=h,e?d<0:p<=d)throw c("Reduce of empty array with no initial value")}for(;e?d>=0:p>d;d+=h)d in f&&(u=t(u,f[d],d,s));return u}};e.exports={left:u(!1),right:u(!0)}},206:(e,n,t)=>{var r=t(1702);e.exports=r([].slice)},4362:(e,n,t)=>{var r=t(206),o=Math.floor,i=function(e,n){var t=e.length,c=o(t/2);return t<8?a(e,n):l(e,i(r(e,0,c),n),i(r(e,c),n),n)},a=function(e,n){for(var t,r,o=e.length,i=1;i0;)e[r]=e[--r];r!==i++&&(e[r]=t)}return e},l=function(e,n,t,r){for(var o=n.length,i=t.length,a=0,l=0;a{var r=t(7854),o=t(3157),i=t(4411),a=t(111),l=t(5112)("species"),c=r.Array;e.exports=function(e){var n;return o(e)&&(n=e.constructor,(i(n)&&(n===c||o(n.prototype))||a(n)&&null===(n=n[l]))&&(n=void 0)),void 0===n?c:n}},5417:(e,n,t)=>{var r=t(7475);e.exports=function(e,n){return new(r(e))(0===n?0:n)}},3411:(e,n,t)=>{var r=t(9670),o=t(9212);e.exports=function(e,n,t,i){try{return i?n(r(t)[0],t[1]):n(t)}catch(n){o(e,"throw",n)}}},7072:(e,n,t)=>{var r=t(5112)("iterator"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){o=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,n){if(!n&&!o)return!1;var t=!1;try{var i={};i[r]=function(){return{next:function(){return{done:t=!0}}}},e(i)}catch(e){}return t}},4326:(e,n,t)=>{var r=t(1702),o=r({}.toString),i=r("".slice);e.exports=function(e){return i(o(e),8,-1)}},648:(e,n,t)=>{var r=t(7854),o=t(1694),i=t(614),a=t(4326),l=t(5112)("toStringTag"),c=r.Object,u="Arguments"==a(function(){return arguments}());e.exports=o?a:function(e){var n,t,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(t=function(e,n){try{return e[n]}catch(e){}}(n=c(e),l))?t:u?a(n):"Object"==(r=a(n))&&i(n.callee)?"Arguments":r}},5631:(e,n,t)=>{"use strict";var r=t(3070).f,o=t(30),i=t(2248),a=t(9974),l=t(5787),c=t(408),u=t(654),s=t(6340),f=t(9781),p=t(2423).fastKey,d=t(9909),h=d.set,g=d.getterFor;e.exports={getConstructor:function(e,n,t,u){var s=e((function(e,r){l(e,d),h(e,{type:n,index:o(null),first:void 0,last:void 0,size:0}),f||(e.size=0),null!=r&&c(r,e[u],{that:e,AS_ENTRIES:t})})),d=s.prototype,v=g(n),A=function(e,n,t){var r,o,i=v(e),a=b(e,n);return a?a.value=t:(i.last=a={index:o=p(n,!0),key:n,value:t,previous:r=i.last,next:void 0,removed:!1},i.first||(i.first=a),r&&(r.next=a),f?i.size++:e.size++,"F"!==o&&(i.index[o]=a)),e},b=function(e,n){var t,r=v(e),o=p(n);if("F"!==o)return r.index[o];for(t=r.first;t;t=t.next)if(t.key==n)return t};return i(d,{clear:function(){for(var e=v(this),n=e.index,t=e.first;t;)t.removed=!0,t.previous&&(t.previous=t.previous.next=void 0),delete n[t.index],t=t.next;e.first=e.last=void 0,f?e.size=0:this.size=0},delete:function(e){var n=this,t=v(n),r=b(n,e);if(r){var o=r.next,i=r.previous;delete t.index[r.index],r.removed=!0,i&&(i.next=o),o&&(o.previous=i),t.first==r&&(t.first=o),t.last==r&&(t.last=i),f?t.size--:n.size--}return!!r},forEach:function(e){for(var n,t=v(this),r=a(e,arguments.length>1?arguments[1]:void 0);n=n?n.next:t.first;)for(r(n.value,n.key,this);n&&n.removed;)n=n.previous},has:function(e){return!!b(this,e)}}),i(d,t?{get:function(e){var n=b(this,e);return n&&n.value},set:function(e,n){return A(this,0===e?0:e,n)}}:{add:function(e){return A(this,e=0===e?0:e,e)}}),f&&r(d,"size",{get:function(){return v(this).size}}),s},setStrong:function(e,n,t){var r=n+" Iterator",o=g(n),i=g(r);u(e,n,(function(e,n){h(this,{type:r,target:e,state:o(e),kind:n,last:void 0})}),(function(){for(var e=i(this),n=e.kind,t=e.last;t&&t.removed;)t=t.previous;return e.target&&(e.last=t=t?t.next:e.state.first)?"keys"==n?{value:t.key,done:!1}:"values"==n?{value:t.value,done:!1}:{value:[t.key,t.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})}),t?"entries":"values",!t,!0),s(n)}}},9320:(e,n,t)=>{"use strict";var r=t(1702),o=t(2248),i=t(2423).getWeakData,a=t(9670),l=t(111),c=t(5787),u=t(408),s=t(2092),f=t(2597),p=t(9909),d=p.set,h=p.getterFor,g=s.find,v=s.findIndex,A=r([].splice),b=0,m=function(e){return e.frozen||(e.frozen=new y)},y=function(){this.entries=[]},E=function(e,n){return g(e.entries,(function(e){return e[0]===n}))};y.prototype={get:function(e){var n=E(this,e);if(n)return n[1]},has:function(e){return!!E(this,e)},set:function(e,n){var t=E(this,e);t?t[1]=n:this.entries.push([e,n])},delete:function(e){var n=v(this.entries,(function(n){return n[0]===e}));return~n&&A(this.entries,n,1),!!~n}},e.exports={getConstructor:function(e,n,t,r){var s=e((function(e,o){c(e,p),d(e,{type:n,id:b++,frozen:void 0}),null!=o&&u(o,e[r],{that:e,AS_ENTRIES:t})})),p=s.prototype,g=h(n),v=function(e,n,t){var r=g(e),o=i(a(n),!0);return!0===o?m(r).set(n,t):o[r.id]=t,e};return o(p,{delete:function(e){var n=g(this);if(!l(e))return!1;var t=i(e);return!0===t?m(n).delete(e):t&&f(t,n.id)&&delete t[n.id]},has:function(e){var n=g(this);if(!l(e))return!1;var t=i(e);return!0===t?m(n).has(e):t&&f(t,n.id)}}),o(p,t?{get:function(e){var n=g(this);if(l(e)){var t=i(e);return!0===t?m(n).get(e):t?t[n.id]:void 0}},set:function(e,n){return v(this,e,n)}}:{add:function(e){return v(this,e,!0)}}),s}}},7710:(e,n,t)=>{"use strict";var r=t(2109),o=t(7854),i=t(1702),a=t(4705),l=t(1320),c=t(2423),u=t(408),s=t(5787),f=t(614),p=t(111),d=t(7293),h=t(7072),g=t(8003),v=t(9587);e.exports=function(e,n,t){var A=-1!==e.indexOf("Map"),b=-1!==e.indexOf("Weak"),m=A?"set":"add",y=o[e],E=y&&y.prototype,_=y,C={},w=function(e){var n=i(E[e]);l(E,e,"add"==e?function(e){return n(this,0===e?0:e),this}:"delete"==e?function(e){return!(b&&!p(e))&&n(this,0===e?0:e)}:"get"==e?function(e){return b&&!p(e)?void 0:n(this,0===e?0:e)}:"has"==e?function(e){return!(b&&!p(e))&&n(this,0===e?0:e)}:function(e,t){return n(this,0===e?0:e,t),this})};if(a(e,!f(y)||!(b||E.forEach&&!d((function(){(new y).entries().next()})))))_=t.getConstructor(n,e,A,m),c.enable();else if(a(e,!0)){var x=new _,k=x[m](b?{}:-0,1)!=x,S=d((function(){x.has(1)})),O=h((function(e){new y(e)})),B=!b&&d((function(){for(var e=new y,n=5;n--;)e[m](n,n);return!e.has(-0)}));O||((_=n((function(e,n){s(e,E);var t=v(new y,e,_);return null!=n&&u(n,t[m],{that:t,AS_ENTRIES:A}),t}))).prototype=E,E.constructor=_),(S||B)&&(w("delete"),w("has"),A&&w("get")),(B||k)&&w(m),b&&E.clear&&delete E.clear}return C[e]=_,r({global:!0,forced:_!=y},C),g(_,e),b||t.setStrong(_,e,A),_}},9920:(e,n,t)=>{var r=t(2597),o=t(3887),i=t(1236),a=t(3070);e.exports=function(e,n){for(var t=o(n),l=a.f,c=i.f,u=0;u{var r=t(5112)("match");e.exports=function(e){var n=/./;try{"/./"[e](n)}catch(t){try{return n[r]=!1,"/./"[e](n)}catch(e){}}return!1}},8544:(e,n,t)=>{var r=t(7293);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},4230:(e,n,t)=>{var r=t(1702),o=t(4488),i=t(1340),a=/"/g,l=r("".replace);e.exports=function(e,n,t,r){var c=i(o(e)),u="<"+n;return""!==t&&(u+=" "+t+'="'+l(i(r),a,""")+'"'),u+">"+c+""}},4994:(e,n,t)=>{"use strict";var r=t(3383).IteratorPrototype,o=t(30),i=t(9114),a=t(8003),l=t(7497),c=function(){return this};e.exports=function(e,n,t){var u=n+" Iterator";return e.prototype=o(r,{next:i(1,t)}),a(e,u,!1,!0),l[u]=c,e}},8880:(e,n,t)=>{var r=t(9781),o=t(3070),i=t(9114);e.exports=r?function(e,n,t){return o.f(e,n,i(1,t))}:function(e,n,t){return e[n]=t,e}},9114:e=>{e.exports=function(e,n){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:n}}},6135:(e,n,t)=>{"use strict";var r=t(4948),o=t(3070),i=t(9114);e.exports=function(e,n,t){var a=r(n);a in e?o.f(e,a,i(0,t)):e[a]=t}},8709:(e,n,t)=>{"use strict";var r=t(7854),o=t(9670),i=t(2140),a=r.TypeError;e.exports=function(e){if(o(this),"string"===e||"default"===e)e="string";else if("number"!==e)throw a("Incorrect hint");return i(this,e)}},654:(e,n,t)=>{"use strict";var r=t(2109),o=t(6916),i=t(1913),a=t(6530),l=t(614),c=t(4994),u=t(9518),s=t(7674),f=t(8003),p=t(8880),d=t(1320),h=t(5112),g=t(7497),v=t(3383),A=a.PROPER,b=a.CONFIGURABLE,m=v.IteratorPrototype,y=v.BUGGY_SAFARI_ITERATORS,E=h("iterator"),_="keys",C="values",w="entries",x=function(){return this};e.exports=function(e,n,t,a,h,v,k){c(t,n,a);var S,O,B,I=function(e){if(e===h&&R)return R;if(!y&&e in j)return j[e];switch(e){case _:case C:case w:return function(){return new t(this,e)}}return function(){return new t(this)}},T=n+" Iterator",P=!1,j=e.prototype,z=j[E]||j["@@iterator"]||h&&j[h],R=!y&&z||I(h),M="Array"==n&&j.entries||z;if(M&&(S=u(M.call(new e)))!==Object.prototype&&S.next&&(i||u(S)===m||(s?s(S,m):l(S[E])||d(S,E,x)),f(S,T,!0,!0),i&&(g[T]=x)),A&&h==C&&z&&z.name!==C&&(!i&&b?p(j,"name",C):(P=!0,R=function(){return o(z,this)})),h)if(O={values:I(C),keys:v?R:I(_),entries:I(w)},k)for(B in O)(y||P||!(B in j))&&d(j,B,O[B]);else r({target:n,proto:!0,forced:y||P},O);return i&&!k||j[E]===R||d(j,E,R,{name:h}),g[n]=R,O}},7235:(e,n,t)=>{var r=t(857),o=t(2597),i=t(6061),a=t(3070).f;e.exports=function(e){var n=r.Symbol||(r.Symbol={});o(n,e)||a(n,e,{value:i.f(e)})}},9781:(e,n,t)=>{var r=t(7293);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},317:(e,n,t)=>{var r=t(7854),o=t(111),i=r.document,a=o(i)&&o(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},8324:e=>{e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8509:(e,n,t)=>{var r=t(317)("span").classList,o=r&&r.constructor&&r.constructor.prototype;e.exports=o===Object.prototype?void 0:o},8886:(e,n,t)=>{var r=t(8113).match(/firefox\/(\d+)/i);e.exports=!!r&&+r[1]},256:(e,n,t)=>{var r=t(8113);e.exports=/MSIE|Trident/.test(r)},5268:(e,n,t)=>{var r=t(4326),o=t(7854);e.exports="process"==r(o.process)},8113:(e,n,t)=>{var r=t(5005);e.exports=r("navigator","userAgent")||""},7392:(e,n,t)=>{var r,o,i=t(7854),a=t(8113),l=i.process,c=i.Deno,u=l&&l.versions||c&&c.version,s=u&&u.v8;s&&(o=(r=s.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(o=+r[1]),e.exports=o},8008:(e,n,t)=>{var r=t(8113).match(/AppleWebKit\/(\d+)\./);e.exports=!!r&&+r[1]},748:e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:(e,n,t)=>{var r=t(7854),o=t(1236).f,i=t(8880),a=t(1320),l=t(3505),c=t(9920),u=t(4705);e.exports=function(e,n){var t,s,f,p,d,h=e.target,g=e.global,v=e.stat;if(t=g?r:v?r[h]||l(h,{}):(r[h]||{}).prototype)for(s in n){if(p=n[s],f=e.noTargetGet?(d=o(t,s))&&d.value:t[s],!u(g?s:h+(v?".":"#")+s,e.forced)&&void 0!==f){if(typeof p==typeof f)continue;c(p,f)}(e.sham||f&&f.sham)&&i(p,"sham",!0),a(t,s,p,e)}}},7293:e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},7007:(e,n,t)=>{"use strict";t(4916);var r=t(1702),o=t(1320),i=t(2261),a=t(7293),l=t(5112),c=t(8880),u=l("species"),s=RegExp.prototype;e.exports=function(e,n,t,f){var p=l(e),d=!a((function(){var n={};return n[p]=function(){return 7},7!=""[e](n)})),h=d&&!a((function(){var n=!1,t=/a/;return"split"===e&&((t={}).constructor={},t.constructor[u]=function(){return t},t.flags="",t[p]=/./[p]),t.exec=function(){return n=!0,null},t[p](""),!n}));if(!d||!h||t){var g=r(/./[p]),v=n(p,""[e],(function(e,n,t,o,a){var l=r(e),c=n.exec;return c===i||c===s.exec?d&&!a?{done:!0,value:g(n,t,o)}:{done:!0,value:l(t,n,o)}:{done:!1}}));o(String.prototype,e,v[0]),o(s,p,v[1])}f&&c(s[p],"sham",!0)}},6677:(e,n,t)=>{var r=t(7293);e.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},2104:e=>{var n=Function.prototype,t=n.apply,r=n.bind,o=n.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?o.bind(t):function(){return o.apply(t,arguments)})},9974:(e,n,t)=>{var r=t(1702),o=t(9662),i=r(r.bind);e.exports=function(e,n){return o(e),void 0===n?e:i?i(e,n):function(){return e.apply(n,arguments)}}},7065:(e,n,t)=>{"use strict";var r=t(7854),o=t(1702),i=t(9662),a=t(111),l=t(2597),c=t(206),u=r.Function,s=o([].concat),f=o([].join),p={},d=function(e,n,t){if(!l(p,n)){for(var r=[],o=0;o{var n=Function.prototype.call;e.exports=n.bind?n.bind(n):function(){return n.apply(n,arguments)}},6530:(e,n,t)=>{var r=t(9781),o=t(2597),i=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,l=o(i,"name"),c=l&&"something"===function(){}.name,u=l&&(!r||r&&a(i,"name").configurable);e.exports={EXISTS:l,PROPER:c,CONFIGURABLE:u}},1702:e=>{var n=Function.prototype,t=n.bind,r=n.call,o=t&&t.bind(r);e.exports=t?function(e){return e&&o(r,e)}:function(e){return e&&function(){return r.apply(e,arguments)}}},5005:(e,n,t)=>{var r=t(7854),o=t(614),i=function(e){return o(e)?e:void 0};e.exports=function(e,n){return arguments.length<2?i(r[e]):r[e]&&r[e][n]}},1246:(e,n,t)=>{var r=t(648),o=t(8173),i=t(7497),a=t(5112)("iterator");e.exports=function(e){if(null!=e)return o(e,a)||o(e,"@@iterator")||i[r(e)]}},8554:(e,n,t)=>{var r=t(7854),o=t(6916),i=t(9662),a=t(9670),l=t(6330),c=t(1246),u=r.TypeError;e.exports=function(e,n){var t=arguments.length<2?c(e):n;if(i(t))return a(o(t,e));throw u(l(e)+" is not iterable")}},8173:(e,n,t)=>{var r=t(9662);e.exports=function(e,n){var t=e[n];return null==t?void 0:r(t)}},647:(e,n,t)=>{var r=t(1702),o=t(7908),i=Math.floor,a=r("".charAt),l=r("".replace),c=r("".slice),u=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,s=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,n,t,r,f,p){var d=t+e.length,h=r.length,g=s;return void 0!==f&&(f=o(f),g=u),l(p,g,(function(o,l){var u;switch(a(l,0)){case"$":return"$";case"&":return e;case"`":return c(n,0,t);case"'":return c(n,d);case"<":u=f[c(l,1,-1)];break;default:var s=+l;if(0===s)return o;if(s>h){var p=i(s/10);return 0===p?o:p<=h?void 0===r[p-1]?a(l,1):r[p-1]+a(l,1):o}u=r[s-1]}return void 0===u?"":u}))}},7854:(e,n,t)=>{var r=function(e){return e&&e.Math==Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof t.g&&t.g)||function(){return this}()||Function("return this")()},2597:(e,n,t)=>{var r=t(1702),o=t(7908),i=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,n){return i(o(e),n)}},3501:e=>{e.exports={}},490:(e,n,t)=>{var r=t(5005);e.exports=r("document","documentElement")},4664:(e,n,t)=>{var r=t(9781),o=t(7293),i=t(317);e.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},8361:(e,n,t)=>{var r=t(7854),o=t(1702),i=t(7293),a=t(4326),l=r.Object,c=o("".split);e.exports=i((function(){return!l("z").propertyIsEnumerable(0)}))?function(e){return"String"==a(e)?c(e,""):l(e)}:l},9587:(e,n,t)=>{var r=t(614),o=t(111),i=t(7674);e.exports=function(e,n,t){var a,l;return i&&r(a=n.constructor)&&a!==t&&o(l=a.prototype)&&l!==t.prototype&&i(e,l),e}},2788:(e,n,t)=>{var r=t(1702),o=t(614),i=t(5465),a=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(e){return a(e)}),e.exports=i.inspectSource},2423:(e,n,t)=>{var r=t(2109),o=t(1702),i=t(3501),a=t(111),l=t(2597),c=t(3070).f,u=t(8006),s=t(1156),f=t(2050),p=t(9711),d=t(6677),h=!1,g=p("meta"),v=0,A=function(e){c(e,g,{value:{objectID:"O"+v++,weakData:{}}})},b=e.exports={enable:function(){b.enable=function(){},h=!0;var e=u.f,n=o([].splice),t={};t[g]=1,e(t).length&&(u.f=function(t){for(var r=e(t),o=0,i=r.length;o{var r,o,i,a=t(8536),l=t(7854),c=t(1702),u=t(111),s=t(8880),f=t(2597),p=t(5465),d=t(6200),h=t(3501),g="Object already initialized",v=l.TypeError,A=l.WeakMap;if(a||p.state){var b=p.state||(p.state=new A),m=c(b.get),y=c(b.has),E=c(b.set);r=function(e,n){if(y(b,e))throw new v(g);return n.facade=e,E(b,e,n),n},o=function(e){return m(b,e)||{}},i=function(e){return y(b,e)}}else{var _=d("state");h[_]=!0,r=function(e,n){if(f(e,_))throw new v(g);return n.facade=e,s(e,_,n),n},o=function(e){return f(e,_)?e[_]:{}},i=function(e){return f(e,_)}}e.exports={set:r,get:o,has:i,enforce:function(e){return i(e)?o(e):r(e,{})},getterFor:function(e){return function(n){var t;if(!u(n)||(t=o(n)).type!==e)throw v("Incompatible receiver, "+e+" required");return t}}}},7659:(e,n,t)=>{var r=t(5112),o=t(7497),i=r("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||a[i]===e)}},3157:(e,n,t)=>{var r=t(4326);e.exports=Array.isArray||function(e){return"Array"==r(e)}},614:e=>{e.exports=function(e){return"function"==typeof e}},4411:(e,n,t)=>{var r=t(1702),o=t(7293),i=t(614),a=t(648),l=t(5005),c=t(2788),u=function(){},s=[],f=l("Reflect","construct"),p=/^\s*(?:class|function)\b/,d=r(p.exec),h=!p.exec(u),g=function(e){if(!i(e))return!1;try{return f(u,s,e),!0}catch(e){return!1}};e.exports=!f||o((function(){var e;return g(g.call)||!g(Object)||!g((function(){e=!0}))||e}))?function(e){if(!i(e))return!1;switch(a(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return h||!!d(p,c(e))}:g},4705:(e,n,t)=>{var r=t(7293),o=t(614),i=/#|\.prototype\./,a=function(e,n){var t=c[l(e)];return t==s||t!=u&&(o(n)?r(n):!!n)},l=a.normalize=function(e){return String(e).replace(i,".").toLowerCase()},c=a.data={},u=a.NATIVE="N",s=a.POLYFILL="P";e.exports=a},111:(e,n,t)=>{var r=t(614);e.exports=function(e){return"object"==typeof e?null!==e:r(e)}},1913:e=>{e.exports=!1},7850:(e,n,t)=>{var r=t(111),o=t(4326),i=t(5112)("match");e.exports=function(e){var n;return r(e)&&(void 0!==(n=e[i])?!!n:"RegExp"==o(e))}},2190:(e,n,t)=>{var r=t(7854),o=t(5005),i=t(614),a=t(7976),l=t(3307),c=r.Object;e.exports=l?function(e){return"symbol"==typeof e}:function(e){var n=o("Symbol");return i(n)&&a(n.prototype,c(e))}},408:(e,n,t)=>{var r=t(7854),o=t(9974),i=t(6916),a=t(9670),l=t(6330),c=t(7659),u=t(6244),s=t(7976),f=t(8554),p=t(1246),d=t(9212),h=r.TypeError,g=function(e,n){this.stopped=e,this.result=n},v=g.prototype;e.exports=function(e,n,t){var r,A,b,m,y,E,_,C=t&&t.that,w=!(!t||!t.AS_ENTRIES),x=!(!t||!t.IS_ITERATOR),k=!(!t||!t.INTERRUPTED),S=o(n,C),O=function(e){return r&&d(r,"normal",e),new g(!0,e)},B=function(e){return w?(a(e),k?S(e[0],e[1],O):S(e[0],e[1])):k?S(e,O):S(e)};if(x)r=e;else{if(!(A=p(e)))throw h(l(e)+" is not iterable");if(c(A)){for(b=0,m=u(e);m>b;b++)if((y=B(e[b]))&&s(v,y))return y;return new g(!1)}r=f(e,A)}for(E=r.next;!(_=i(E,r)).done;){try{y=B(_.value)}catch(e){d(r,"throw",e)}if("object"==typeof y&&y&&s(v,y))return y}return new g(!1)}},9212:(e,n,t)=>{var r=t(6916),o=t(9670),i=t(8173);e.exports=function(e,n,t){var a,l;o(e);try{if(!(a=i(e,"return"))){if("throw"===n)throw t;return t}a=r(a,e)}catch(e){l=!0,a=e}if("throw"===n)throw t;if(l)throw a;return o(a),t}},3383:(e,n,t)=>{"use strict";var r,o,i,a=t(7293),l=t(614),c=t(30),u=t(9518),s=t(1320),f=t(5112),p=t(1913),d=f("iterator"),h=!1;[].keys&&("next"in(i=[].keys())?(o=u(u(i)))!==Object.prototype&&(r=o):h=!0),null==r||a((function(){var e={};return r[d].call(e)!==e}))?r={}:p&&(r=c(r)),l(r[d])||s(r,d,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:h}},7497:e=>{e.exports={}},6244:(e,n,t)=>{var r=t(7466);e.exports=function(e){return r(e.length)}},133:(e,n,t)=>{var r=t(7392),o=t(7293);e.exports=!!Object.getOwnPropertySymbols&&!o((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},8536:(e,n,t)=>{var r=t(7854),o=t(614),i=t(2788),a=r.WeakMap;e.exports=o(a)&&/native code/.test(i(a))},3929:(e,n,t)=>{var r=t(7854),o=t(7850),i=r.TypeError;e.exports=function(e){if(o(e))throw i("The method doesn't accept regular expressions");return e}},1574:(e,n,t)=>{"use strict";var r=t(9781),o=t(1702),i=t(6916),a=t(7293),l=t(1956),c=t(5181),u=t(5296),s=t(7908),f=t(8361),p=Object.assign,d=Object.defineProperty,h=o([].concat);e.exports=!p||a((function(){if(r&&1!==p({b:1},p(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},n={},t=Symbol(),o="abcdefghijklmnopqrst";return e[t]=7,o.split("").forEach((function(e){n[e]=e})),7!=p({},e)[t]||l(p({},n)).join("")!=o}))?function(e,n){for(var t=s(e),o=arguments.length,a=1,p=c.f,d=u.f;o>a;)for(var g,v=f(arguments[a++]),A=p?h(l(v),p(v)):l(v),b=A.length,m=0;b>m;)g=A[m++],r&&!i(d,v,g)||(t[g]=v[g]);return t}:p},30:(e,n,t)=>{var r,o=t(9670),i=t(6048),a=t(748),l=t(3501),c=t(490),u=t(317),s=t(6200),f=s("IE_PROTO"),p=function(){},d=function(e){return" + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

AudioByteBuilder

+

Inheritors

+
+
+
+
+
+

Functions

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
abstract fun load(context: Any, localPath: String): Any
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
abstract fun play(item: Any)
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
abstract fun release()
+
+
+
+
+
+
+
+
+
+ +
+
+
+ + diff --git a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-byte-builder/load.html b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-byte-builder/load.html new file mode 100644 index 0000000..feeb2f2 --- /dev/null +++ b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-byte-builder/load.html @@ -0,0 +1,80 @@ + + + + + load + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

load

+
+
abstract fun load(context: Any, localPath: String): Any
+
+ +
+
+
+ + diff --git a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-byte-builder/play.html b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-byte-builder/play.html new file mode 100644 index 0000000..037803b --- /dev/null +++ b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-byte-builder/play.html @@ -0,0 +1,80 @@ + + + + + play + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

play

+
+
abstract fun play(item: Any)
+
+ +
+
+
+ + diff --git a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-byte-builder/release.html b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-byte-builder/release.html new file mode 100644 index 0000000..b0d6646 --- /dev/null +++ b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-byte-builder/release.html @@ -0,0 +1,80 @@ + + + + + release + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

release

+
+
abstract fun release()
+
+ +
+
+
+ + diff --git a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-byte/-audio-byte.html b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-byte/-audio-byte.html new file mode 100644 index 0000000..88182c8 --- /dev/null +++ b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-byte/-audio-byte.html @@ -0,0 +1,84 @@ + + + + + AudioByte + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

AudioByte

+
+
+
+
expect constructor()
actual constructor()
actual constructor()
+
+ +
+
+
+ + diff --git a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-byte/index.html b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-byte/index.html new file mode 100644 index 0000000..156424a --- /dev/null +++ b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-byte/index.html @@ -0,0 +1,165 @@ + + + + + AudioByte + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

AudioByte

+
+
+

Play audio from a local file path or a Compose Resource (String).

Example:

val audioByte: AudioByte = AudioByte() // Create an AudioByte instance
val clickSound: Any = audioByte.load(Res.getUri("files/click.mp3")) // Load the audio file into memory
audioByte.play(clickSound) // Call it whenever you like as needed
+
+
+
+
+
+

Constructors

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
expect constructor()
actual constructor()
actual constructor()
+
+
+
+
+
+
+
+

Functions

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
expect open override fun load(context: Any, localPath: String): Any

Used to load an Audio file into memory.

actual open override fun load(context: Any, localPath: String): Any
actual open override fun load(context: Any, localPath: String): Any
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
expect open override fun play(item: Any)

Play a loaded sound immediately, without regard for how many times it's already played

actual open override fun play(item: Any)
actual open override fun play(item: Any)
+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+
expect open override fun release()

Used when done to clear the AudioByte object from memory.

actual open override fun release()
actual open override fun release()
+
+
+
+
+
+
+
+
+
+ +
+
+
+ + diff --git a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-byte/load.html b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-byte/load.html new file mode 100644 index 0000000..1aa6c40 --- /dev/null +++ b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-byte/load.html @@ -0,0 +1,84 @@ + + + + + load + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

load

+
+
+
+
expect open override fun load(context: Any, localPath: String): Any

Used to load an Audio file into memory.

Parameters

context

provide the Platform Context (this is mostly to accommodate Android)

localPath

provide the path and filename for the audio file as a String

Example:

val audioByte: AudioByte = AudioByte() // Create an AudioByte instance
val clickSound: Any = audioByte.load(Res.getUri("files/click.mp3")) // Load the audio file into memory
actual open override fun load(context: Any, localPath: String): Any
actual open override fun load(context: Any, localPath: String): Any
+
+ +
+
+
+ + diff --git a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-byte/play.html b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-byte/play.html new file mode 100644 index 0000000..4e3398f --- /dev/null +++ b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-byte/play.html @@ -0,0 +1,84 @@ + + + + + play + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

play

+
+
+
+
expect open override fun play(item: Any)

Play a loaded sound immediately, without regard for how many times it's already played

Parameters

item

provide the result of the load function called previously

Example:

val audioByte: AudioByte = AudioByte() // Create an AudioByte instance
val clickSound: Any = audioByte.load(Res.getUri("files/click.mp3")) // Load the audio file into memory
audioByte.play(clickSound) // Call it whenever you like as needed
actual open override fun play(item: Any)
actual open override fun play(item: Any)
+
+ +
+
+
+ + diff --git a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-byte/release.html b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-byte/release.html new file mode 100644 index 0000000..5ae6102 --- /dev/null +++ b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-byte/release.html @@ -0,0 +1,84 @@ + + + + + release + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

release

+
+
+
+
expect open override fun release()

Used when done to clear the AudioByte object from memory.

Example:

val audioByte: AudioByte = AudioByte() // Create an AudioByte instance
val clickSound: Any = audioByte.load(Res.getUri("files/click.mp3")) // Load the audio file into memory
audioByte.release() // audio can no longer be called
actual open override fun release()
actual open override fun release()
+
+ +
+
+
+ + diff --git a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-state/-e-r-r-o-r/-e-r-r-o-r.html b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-state/-e-r-r-o-r/-e-r-r-o-r.html index 8f77aa7..e7d5d42 100644 --- a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-state/-e-r-r-o-r/-e-r-r-o-r.html +++ b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-state/-e-r-r-o-r/-e-r-r-o-r.html @@ -45,7 +45,7 @@
-0.1.10
+0.2.0
diff --git a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-state/-e-r-r-o-r/index.html b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-state/-e-r-r-o-r/index.html index 6a579ca..5663e15 100644 --- a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-state/-e-r-r-o-r/index.html +++ b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-state/-e-r-r-o-r/index.html @@ -45,7 +45,7 @@
-0.1.10
+0.2.0
diff --git a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-state/-e-r-r-o-r/message.html b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-state/-e-r-r-o-r/message.html index 58a6310..f2cd523 100644 --- a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-state/-e-r-r-o-r/message.html +++ b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-state/-e-r-r-o-r/message.html @@ -45,7 +45,7 @@
-0.1.10
+0.2.0
diff --git a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-state/-l-o-a-d-i-n-g/index.html b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-state/-l-o-a-d-i-n-g/index.html index b2385de..f8d395e 100644 --- a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-state/-l-o-a-d-i-n-g/index.html +++ b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-state/-l-o-a-d-i-n-g/index.html @@ -45,7 +45,7 @@
-0.1.10
+0.2.0
diff --git a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-state/-n-o-n-e/index.html b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-state/-n-o-n-e/index.html index 6bf519b..3ea4971 100644 --- a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-state/-n-o-n-e/index.html +++ b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-state/-n-o-n-e/index.html @@ -45,7 +45,7 @@
-0.1.10
+0.2.0
diff --git a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-state/-p-a-u-s-e-d/index.html b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-state/-p-a-u-s-e-d/index.html index d0e5598..5fcdd46 100644 --- a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-state/-p-a-u-s-e-d/index.html +++ b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-state/-p-a-u-s-e-d/index.html @@ -45,7 +45,7 @@
-0.1.10
+0.2.0
diff --git a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-state/-p-l-a-y-i-n-g/index.html b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-state/-p-l-a-y-i-n-g/index.html index ff0454c..27de25a 100644 --- a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-state/-p-l-a-y-i-n-g/index.html +++ b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-state/-p-l-a-y-i-n-g/index.html @@ -45,7 +45,7 @@
-0.1.10
+0.2.0
diff --git a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-state/-r-e-a-d-y/index.html b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-state/-r-e-a-d-y/index.html index b4b75ed..3de33ea 100644 --- a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-state/-r-e-a-d-y/index.html +++ b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-state/-r-e-a-d-y/index.html @@ -45,7 +45,7 @@
-0.1.10
+0.2.0
diff --git a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-state/index.html b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-state/index.html index 8e606f8..3f5e43e 100644 --- a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-state/index.html +++ b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio-state/index.html @@ -45,7 +45,7 @@
-0.1.10
+0.2.0
diff --git a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio/-audio.html b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio/-audio.html index 9c2f352..3e6f40f 100644 --- a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio/-audio.html +++ b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio/-audio.html @@ -45,7 +45,7 @@
-0.1.10
+0.2.0
diff --git a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio/audio-state.html b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio/audio-state.html index 987acad..819e6d9 100644 --- a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio/audio-state.html +++ b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio/audio-state.html @@ -45,7 +45,7 @@
-0.1.10
+0.2.0
diff --git a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio/auto-play.html b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio/auto-play.html index fe41160..da0a2a4 100644 --- a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio/auto-play.html +++ b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio/auto-play.html @@ -45,7 +45,7 @@
-0.1.10
+0.2.0
diff --git a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio/index.html b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio/index.html index ba25c72..76494e6 100644 --- a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio/index.html +++ b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio/index.html @@ -45,7 +45,7 @@
-0.1.10
+0.2.0
diff --git a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio/load.html b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio/load.html index 20988c2..1fff732 100644 --- a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio/load.html +++ b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio/load.html @@ -45,7 +45,7 @@
-0.1.10
+0.2.0
diff --git a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio/pause.html b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio/pause.html index 360cb97..0534527 100644 --- a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio/pause.html +++ b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio/pause.html @@ -45,7 +45,7 @@
-0.1.10
+0.2.0
diff --git a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio/play.html b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio/play.html index 4af7bb2..c0115a9 100644 --- a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio/play.html +++ b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio/play.html @@ -45,7 +45,7 @@
-0.1.10
+0.2.0
diff --git a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio/release.html b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio/release.html index c53f165..4558c6f 100644 --- a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio/release.html +++ b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio/release.html @@ -45,7 +45,7 @@
-0.1.10
+0.2.0
diff --git a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio/resource.html b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio/resource.html index d4d3182..f317412 100644 --- a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio/resource.html +++ b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio/resource.html @@ -45,7 +45,7 @@
-0.1.10
+0.2.0
diff --git a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio/stop.html b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio/stop.html index 47c0517..814aaba 100644 --- a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio/stop.html +++ b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-audio/stop.html @@ -45,7 +45,7 @@
-0.1.10
+0.2.0
diff --git a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-experimental-basic-sound/index.html b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-experimental-basic-sound/index.html index 59a22c5..bc6bfb1 100644 --- a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-experimental-basic-sound/index.html +++ b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/-experimental-basic-sound/index.html @@ -45,7 +45,7 @@
-0.1.10
+0.2.0
diff --git a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/index.html b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/index.html index e2a860a..f35b6cd 100644 --- a/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/index.html +++ b/docs/basic-sound/basic-sound/app.lexilabs.basic.sound/index.html @@ -45,7 +45,7 @@
-0.1.10
+0.2.0
@@ -107,6 +107,38 @@

Types

+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
+
+

Play audio from a local file path or a Compose Resource (String).

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
diff --git a/docs/basic-sound/basic-sound/package-list b/docs/basic-sound/basic-sound/package-list index 359c61d..aa0f4d3 100644 --- a/docs/basic-sound/basic-sound/package-list +++ b/docs/basic-sound/basic-sound/package-list @@ -19,6 +19,15 @@ $dokka.location:app.lexilabs.basic.sound/AudioBuilder/pause/#/PointingToDeclarat $dokka.location:app.lexilabs.basic.sound/AudioBuilder/play/#/PointingToDeclaration/basic-sound/app.lexilabs.basic.sound/-audio-builder/play.html $dokka.location:app.lexilabs.basic.sound/AudioBuilder/release/#/PointingToDeclaration/basic-sound/app.lexilabs.basic.sound/-audio-builder/release.html $dokka.location:app.lexilabs.basic.sound/AudioBuilder/stop/#/PointingToDeclaration/basic-sound/app.lexilabs.basic.sound/-audio-builder/stop.html +$dokka.location:app.lexilabs.basic.sound/AudioByte///PointingToDeclaration/basic-sound/app.lexilabs.basic.sound/-audio-byte/index.html +$dokka.location:app.lexilabs.basic.sound/AudioByte/AudioByte/#/PointingToDeclaration/basic-sound/app.lexilabs.basic.sound/-audio-byte/-audio-byte.html +$dokka.location:app.lexilabs.basic.sound/AudioByte/load/#kotlin.Any#kotlin.String/PointingToDeclaration/basic-sound/app.lexilabs.basic.sound/-audio-byte/load.html +$dokka.location:app.lexilabs.basic.sound/AudioByte/play/#kotlin.Any/PointingToDeclaration/basic-sound/app.lexilabs.basic.sound/-audio-byte/play.html +$dokka.location:app.lexilabs.basic.sound/AudioByte/release/#/PointingToDeclaration/basic-sound/app.lexilabs.basic.sound/-audio-byte/release.html +$dokka.location:app.lexilabs.basic.sound/AudioByteBuilder///PointingToDeclaration/basic-sound/app.lexilabs.basic.sound/-audio-byte-builder/index.html +$dokka.location:app.lexilabs.basic.sound/AudioByteBuilder/load/#kotlin.Any#kotlin.String/PointingToDeclaration/basic-sound/app.lexilabs.basic.sound/-audio-byte-builder/load.html +$dokka.location:app.lexilabs.basic.sound/AudioByteBuilder/play/#kotlin.Any/PointingToDeclaration/basic-sound/app.lexilabs.basic.sound/-audio-byte-builder/play.html +$dokka.location:app.lexilabs.basic.sound/AudioByteBuilder/release/#/PointingToDeclaration/basic-sound/app.lexilabs.basic.sound/-audio-byte-builder/release.html $dokka.location:app.lexilabs.basic.sound/AudioState.ERROR///PointingToDeclaration/basic-sound/app.lexilabs.basic.sound/-audio-state/-e-r-r-o-r/index.html $dokka.location:app.lexilabs.basic.sound/AudioState.ERROR/ERROR/#kotlin.String/PointingToDeclaration/basic-sound/app.lexilabs.basic.sound/-audio-state/-e-r-r-o-r/-e-r-r-o-r.html $dokka.location:app.lexilabs.basic.sound/AudioState.ERROR/message/#/PointingToDeclaration/basic-sound/app.lexilabs.basic.sound/-audio-state/-e-r-r-o-r/message.html diff --git a/docs/basic-sound/index.html b/docs/basic-sound/index.html index 711d3fd..b6c2454 100644 --- a/docs/basic-sound/index.html +++ b/docs/basic-sound/index.html @@ -45,7 +45,7 @@
-0.1.10
+0.2.0
diff --git a/docs/basic-sound/navigation.html b/docs/basic-sound/navigation.html index 0b002e8..905d73b 100644 --- a/docs/basic-sound/navigation.html +++ b/docs/basic-sound/navigation.html @@ -8,28 +8,34 @@ -
- -
+
+ +
+ +
+ + -
+ -
+ -
+ -
+ -
+
- diff --git a/docs/basic-sound/scripts/pages.json b/docs/basic-sound/scripts/pages.json index 31b6685..a015234 100644 --- a/docs/basic-sound/scripts/pages.json +++ b/docs/basic-sound/scripts/pages.json @@ -1 +1 @@ -[{"name":"abstract fun load()","description":"app.lexilabs.basic.sound.AudioBuilder.load","location":"basic-sound/app.lexilabs.basic.sound/-audio-builder/load.html","searchKeys":["load","abstract fun load()","app.lexilabs.basic.sound.AudioBuilder.load"]},{"name":"abstract fun pause()","description":"app.lexilabs.basic.sound.AudioBuilder.pause","location":"basic-sound/app.lexilabs.basic.sound/-audio-builder/pause.html","searchKeys":["pause","abstract fun pause()","app.lexilabs.basic.sound.AudioBuilder.pause"]},{"name":"abstract fun play()","description":"app.lexilabs.basic.sound.AudioBuilder.play","location":"basic-sound/app.lexilabs.basic.sound/-audio-builder/play.html","searchKeys":["play","abstract fun play()","app.lexilabs.basic.sound.AudioBuilder.play"]},{"name":"abstract fun release()","description":"app.lexilabs.basic.sound.AudioBuilder.release","location":"basic-sound/app.lexilabs.basic.sound/-audio-builder/release.html","searchKeys":["release","abstract fun release()","app.lexilabs.basic.sound.AudioBuilder.release"]},{"name":"abstract fun stop()","description":"app.lexilabs.basic.sound.AudioBuilder.stop","location":"basic-sound/app.lexilabs.basic.sound/-audio-builder/stop.html","searchKeys":["stop","abstract fun stop()","app.lexilabs.basic.sound.AudioBuilder.stop"]},{"name":"abstract val audioState: StateFlow","description":"app.lexilabs.basic.sound.AudioBuilder.audioState","location":"basic-sound/app.lexilabs.basic.sound/-audio-builder/audio-state.html","searchKeys":["audioState","abstract val audioState: StateFlow","app.lexilabs.basic.sound.AudioBuilder.audioState"]},{"name":"annotation class ExperimentalBasicSound","description":"app.lexilabs.basic.sound.ExperimentalBasicSound","location":"basic-sound/app.lexilabs.basic.sound/-experimental-basic-sound/index.html","searchKeys":["ExperimentalBasicSound","annotation class ExperimentalBasicSound","app.lexilabs.basic.sound.ExperimentalBasicSound"]},{"name":"constructor(message: String)","description":"app.lexilabs.basic.sound.AudioState.ERROR.ERROR","location":"basic-sound/app.lexilabs.basic.sound/-audio-state/-e-r-r-o-r/-e-r-r-o-r.html","searchKeys":["ERROR","constructor(message: String)","app.lexilabs.basic.sound.AudioState.ERROR.ERROR"]},{"name":"data class ERROR(val message: String) : AudioState","description":"app.lexilabs.basic.sound.AudioState.ERROR","location":"basic-sound/app.lexilabs.basic.sound/-audio-state/-e-r-r-o-r/index.html","searchKeys":["ERROR","data class ERROR(val message: String) : AudioState","app.lexilabs.basic.sound.AudioState.ERROR"]},{"name":"data object LOADING : AudioState","description":"app.lexilabs.basic.sound.AudioState.LOADING","location":"basic-sound/app.lexilabs.basic.sound/-audio-state/-l-o-a-d-i-n-g/index.html","searchKeys":["LOADING","data object LOADING : AudioState","app.lexilabs.basic.sound.AudioState.LOADING"]},{"name":"data object NONE : AudioState","description":"app.lexilabs.basic.sound.AudioState.NONE","location":"basic-sound/app.lexilabs.basic.sound/-audio-state/-n-o-n-e/index.html","searchKeys":["NONE","data object NONE : AudioState","app.lexilabs.basic.sound.AudioState.NONE"]},{"name":"data object PAUSED : AudioState","description":"app.lexilabs.basic.sound.AudioState.PAUSED","location":"basic-sound/app.lexilabs.basic.sound/-audio-state/-p-a-u-s-e-d/index.html","searchKeys":["PAUSED","data object PAUSED : AudioState","app.lexilabs.basic.sound.AudioState.PAUSED"]},{"name":"data object PLAYING : AudioState","description":"app.lexilabs.basic.sound.AudioState.PLAYING","location":"basic-sound/app.lexilabs.basic.sound/-audio-state/-p-l-a-y-i-n-g/index.html","searchKeys":["PLAYING","data object PLAYING : AudioState","app.lexilabs.basic.sound.AudioState.PLAYING"]},{"name":"data object READY : AudioState","description":"app.lexilabs.basic.sound.AudioState.READY","location":"basic-sound/app.lexilabs.basic.sound/-audio-state/-r-e-a-d-y/index.html","searchKeys":["READY","data object READY : AudioState","app.lexilabs.basic.sound.AudioState.READY"]},{"name":"expect class Audio","description":"app.lexilabs.basic.sound.Audio","location":"basic-sound/app.lexilabs.basic.sound/-audio/index.html","searchKeys":["Audio","expect class Audio","app.lexilabs.basic.sound.Audio"]},{"name":"expect constructor()","description":"app.lexilabs.basic.sound.Audio.Audio","location":"basic-sound/app.lexilabs.basic.sound/-audio/-audio.html","searchKeys":["Audio","expect constructor()","app.lexilabs.basic.sound.Audio.Audio"]},{"name":"expect constructor(resource: String, autoPlay: Boolean)","description":"app.lexilabs.basic.sound.Audio.Audio","location":"basic-sound/app.lexilabs.basic.sound/-audio/-audio.html","searchKeys":["Audio","expect constructor(resource: String, autoPlay: Boolean)","app.lexilabs.basic.sound.Audio.Audio"]},{"name":"expect fun load()","description":"app.lexilabs.basic.sound.Audio.load","location":"basic-sound/app.lexilabs.basic.sound/-audio/load.html","searchKeys":["load","expect fun load()","app.lexilabs.basic.sound.Audio.load"]},{"name":"expect fun pause()","description":"app.lexilabs.basic.sound.Audio.pause","location":"basic-sound/app.lexilabs.basic.sound/-audio/pause.html","searchKeys":["pause","expect fun pause()","app.lexilabs.basic.sound.Audio.pause"]},{"name":"expect fun play()","description":"app.lexilabs.basic.sound.Audio.play","location":"basic-sound/app.lexilabs.basic.sound/-audio/play.html","searchKeys":["play","expect fun play()","app.lexilabs.basic.sound.Audio.play"]},{"name":"expect fun release()","description":"app.lexilabs.basic.sound.Audio.release","location":"basic-sound/app.lexilabs.basic.sound/-audio/release.html","searchKeys":["release","expect fun release()","app.lexilabs.basic.sound.Audio.release"]},{"name":"expect fun stop()","description":"app.lexilabs.basic.sound.Audio.stop","location":"basic-sound/app.lexilabs.basic.sound/-audio/stop.html","searchKeys":["stop","expect fun stop()","app.lexilabs.basic.sound.Audio.stop"]},{"name":"expect val audioState: StateFlow","description":"app.lexilabs.basic.sound.Audio.audioState","location":"basic-sound/app.lexilabs.basic.sound/-audio/audio-state.html","searchKeys":["audioState","expect val audioState: StateFlow","app.lexilabs.basic.sound.Audio.audioState"]},{"name":"expect var autoPlay: Boolean","description":"app.lexilabs.basic.sound.Audio.autoPlay","location":"basic-sound/app.lexilabs.basic.sound/-audio/auto-play.html","searchKeys":["autoPlay","expect var autoPlay: Boolean","app.lexilabs.basic.sound.Audio.autoPlay"]},{"name":"expect var resource: String","description":"app.lexilabs.basic.sound.Audio.resource","location":"basic-sound/app.lexilabs.basic.sound/-audio/resource.html","searchKeys":["resource","expect var resource: String","app.lexilabs.basic.sound.Audio.resource"]},{"name":"interface AudioBuilder","description":"app.lexilabs.basic.sound.AudioBuilder","location":"basic-sound/app.lexilabs.basic.sound/-audio-builder/index.html","searchKeys":["AudioBuilder","interface AudioBuilder","app.lexilabs.basic.sound.AudioBuilder"]},{"name":"sealed class AudioState","description":"app.lexilabs.basic.sound.AudioState","location":"basic-sound/app.lexilabs.basic.sound/-audio-state/index.html","searchKeys":["AudioState","sealed class AudioState","app.lexilabs.basic.sound.AudioState"]},{"name":"val message: String","description":"app.lexilabs.basic.sound.AudioState.ERROR.message","location":"basic-sound/app.lexilabs.basic.sound/-audio-state/-e-r-r-o-r/message.html","searchKeys":["message","val message: String","app.lexilabs.basic.sound.AudioState.ERROR.message"]}] +[{"name":"abstract fun load()","description":"app.lexilabs.basic.sound.AudioBuilder.load","location":"basic-sound/app.lexilabs.basic.sound/-audio-builder/load.html","searchKeys":["load","abstract fun load()","app.lexilabs.basic.sound.AudioBuilder.load"]},{"name":"abstract fun load(context: Any, localPath: String): Any","description":"app.lexilabs.basic.sound.AudioByteBuilder.load","location":"basic-sound/app.lexilabs.basic.sound/-audio-byte-builder/load.html","searchKeys":["load","abstract fun load(context: Any, localPath: String): Any","app.lexilabs.basic.sound.AudioByteBuilder.load"]},{"name":"abstract fun pause()","description":"app.lexilabs.basic.sound.AudioBuilder.pause","location":"basic-sound/app.lexilabs.basic.sound/-audio-builder/pause.html","searchKeys":["pause","abstract fun pause()","app.lexilabs.basic.sound.AudioBuilder.pause"]},{"name":"abstract fun play()","description":"app.lexilabs.basic.sound.AudioBuilder.play","location":"basic-sound/app.lexilabs.basic.sound/-audio-builder/play.html","searchKeys":["play","abstract fun play()","app.lexilabs.basic.sound.AudioBuilder.play"]},{"name":"abstract fun play(item: Any)","description":"app.lexilabs.basic.sound.AudioByteBuilder.play","location":"basic-sound/app.lexilabs.basic.sound/-audio-byte-builder/play.html","searchKeys":["play","abstract fun play(item: Any)","app.lexilabs.basic.sound.AudioByteBuilder.play"]},{"name":"abstract fun release()","description":"app.lexilabs.basic.sound.AudioBuilder.release","location":"basic-sound/app.lexilabs.basic.sound/-audio-builder/release.html","searchKeys":["release","abstract fun release()","app.lexilabs.basic.sound.AudioBuilder.release"]},{"name":"abstract fun release()","description":"app.lexilabs.basic.sound.AudioByteBuilder.release","location":"basic-sound/app.lexilabs.basic.sound/-audio-byte-builder/release.html","searchKeys":["release","abstract fun release()","app.lexilabs.basic.sound.AudioByteBuilder.release"]},{"name":"abstract fun stop()","description":"app.lexilabs.basic.sound.AudioBuilder.stop","location":"basic-sound/app.lexilabs.basic.sound/-audio-builder/stop.html","searchKeys":["stop","abstract fun stop()","app.lexilabs.basic.sound.AudioBuilder.stop"]},{"name":"abstract val audioState: StateFlow","description":"app.lexilabs.basic.sound.AudioBuilder.audioState","location":"basic-sound/app.lexilabs.basic.sound/-audio-builder/audio-state.html","searchKeys":["audioState","abstract val audioState: StateFlow","app.lexilabs.basic.sound.AudioBuilder.audioState"]},{"name":"annotation class ExperimentalBasicSound","description":"app.lexilabs.basic.sound.ExperimentalBasicSound","location":"basic-sound/app.lexilabs.basic.sound/-experimental-basic-sound/index.html","searchKeys":["ExperimentalBasicSound","annotation class ExperimentalBasicSound","app.lexilabs.basic.sound.ExperimentalBasicSound"]},{"name":"constructor(message: String)","description":"app.lexilabs.basic.sound.AudioState.ERROR.ERROR","location":"basic-sound/app.lexilabs.basic.sound/-audio-state/-e-r-r-o-r/-e-r-r-o-r.html","searchKeys":["ERROR","constructor(message: String)","app.lexilabs.basic.sound.AudioState.ERROR.ERROR"]},{"name":"data class ERROR(val message: String) : AudioState","description":"app.lexilabs.basic.sound.AudioState.ERROR","location":"basic-sound/app.lexilabs.basic.sound/-audio-state/-e-r-r-o-r/index.html","searchKeys":["ERROR","data class ERROR(val message: String) : AudioState","app.lexilabs.basic.sound.AudioState.ERROR"]},{"name":"data object LOADING : AudioState","description":"app.lexilabs.basic.sound.AudioState.LOADING","location":"basic-sound/app.lexilabs.basic.sound/-audio-state/-l-o-a-d-i-n-g/index.html","searchKeys":["LOADING","data object LOADING : AudioState","app.lexilabs.basic.sound.AudioState.LOADING"]},{"name":"data object NONE : AudioState","description":"app.lexilabs.basic.sound.AudioState.NONE","location":"basic-sound/app.lexilabs.basic.sound/-audio-state/-n-o-n-e/index.html","searchKeys":["NONE","data object NONE : AudioState","app.lexilabs.basic.sound.AudioState.NONE"]},{"name":"data object PAUSED : AudioState","description":"app.lexilabs.basic.sound.AudioState.PAUSED","location":"basic-sound/app.lexilabs.basic.sound/-audio-state/-p-a-u-s-e-d/index.html","searchKeys":["PAUSED","data object PAUSED : AudioState","app.lexilabs.basic.sound.AudioState.PAUSED"]},{"name":"data object PLAYING : AudioState","description":"app.lexilabs.basic.sound.AudioState.PLAYING","location":"basic-sound/app.lexilabs.basic.sound/-audio-state/-p-l-a-y-i-n-g/index.html","searchKeys":["PLAYING","data object PLAYING : AudioState","app.lexilabs.basic.sound.AudioState.PLAYING"]},{"name":"data object READY : AudioState","description":"app.lexilabs.basic.sound.AudioState.READY","location":"basic-sound/app.lexilabs.basic.sound/-audio-state/-r-e-a-d-y/index.html","searchKeys":["READY","data object READY : AudioState","app.lexilabs.basic.sound.AudioState.READY"]},{"name":"expect class Audio","description":"app.lexilabs.basic.sound.Audio","location":"basic-sound/app.lexilabs.basic.sound/-audio/index.html","searchKeys":["Audio","expect class Audio","app.lexilabs.basic.sound.Audio"]},{"name":"expect class AudioByte : AudioByteBuilder","description":"app.lexilabs.basic.sound.AudioByte","location":"basic-sound/app.lexilabs.basic.sound/-audio-byte/index.html","searchKeys":["AudioByte","expect class AudioByte : AudioByteBuilder","app.lexilabs.basic.sound.AudioByte"]},{"name":"expect constructor()","description":"app.lexilabs.basic.sound.Audio.Audio","location":"basic-sound/app.lexilabs.basic.sound/-audio/-audio.html","searchKeys":["Audio","expect constructor()","app.lexilabs.basic.sound.Audio.Audio"]},{"name":"expect constructor()","description":"app.lexilabs.basic.sound.AudioByte.AudioByte","location":"basic-sound/app.lexilabs.basic.sound/-audio-byte/-audio-byte.html","searchKeys":["AudioByte","expect constructor()","app.lexilabs.basic.sound.AudioByte.AudioByte"]},{"name":"expect constructor(resource: String, autoPlay: Boolean)","description":"app.lexilabs.basic.sound.Audio.Audio","location":"basic-sound/app.lexilabs.basic.sound/-audio/-audio.html","searchKeys":["Audio","expect constructor(resource: String, autoPlay: Boolean)","app.lexilabs.basic.sound.Audio.Audio"]},{"name":"expect fun load()","description":"app.lexilabs.basic.sound.Audio.load","location":"basic-sound/app.lexilabs.basic.sound/-audio/load.html","searchKeys":["load","expect fun load()","app.lexilabs.basic.sound.Audio.load"]},{"name":"expect fun pause()","description":"app.lexilabs.basic.sound.Audio.pause","location":"basic-sound/app.lexilabs.basic.sound/-audio/pause.html","searchKeys":["pause","expect fun pause()","app.lexilabs.basic.sound.Audio.pause"]},{"name":"expect fun play()","description":"app.lexilabs.basic.sound.Audio.play","location":"basic-sound/app.lexilabs.basic.sound/-audio/play.html","searchKeys":["play","expect fun play()","app.lexilabs.basic.sound.Audio.play"]},{"name":"expect fun release()","description":"app.lexilabs.basic.sound.Audio.release","location":"basic-sound/app.lexilabs.basic.sound/-audio/release.html","searchKeys":["release","expect fun release()","app.lexilabs.basic.sound.Audio.release"]},{"name":"expect fun stop()","description":"app.lexilabs.basic.sound.Audio.stop","location":"basic-sound/app.lexilabs.basic.sound/-audio/stop.html","searchKeys":["stop","expect fun stop()","app.lexilabs.basic.sound.Audio.stop"]},{"name":"expect open override fun load(context: Any, localPath: String): Any","description":"app.lexilabs.basic.sound.AudioByte.load","location":"basic-sound/app.lexilabs.basic.sound/-audio-byte/load.html","searchKeys":["load","expect open override fun load(context: Any, localPath: String): Any","app.lexilabs.basic.sound.AudioByte.load"]},{"name":"expect open override fun play(item: Any)","description":"app.lexilabs.basic.sound.AudioByte.play","location":"basic-sound/app.lexilabs.basic.sound/-audio-byte/play.html","searchKeys":["play","expect open override fun play(item: Any)","app.lexilabs.basic.sound.AudioByte.play"]},{"name":"expect open override fun release()","description":"app.lexilabs.basic.sound.AudioByte.release","location":"basic-sound/app.lexilabs.basic.sound/-audio-byte/release.html","searchKeys":["release","expect open override fun release()","app.lexilabs.basic.sound.AudioByte.release"]},{"name":"expect val audioState: StateFlow","description":"app.lexilabs.basic.sound.Audio.audioState","location":"basic-sound/app.lexilabs.basic.sound/-audio/audio-state.html","searchKeys":["audioState","expect val audioState: StateFlow","app.lexilabs.basic.sound.Audio.audioState"]},{"name":"expect var autoPlay: Boolean","description":"app.lexilabs.basic.sound.Audio.autoPlay","location":"basic-sound/app.lexilabs.basic.sound/-audio/auto-play.html","searchKeys":["autoPlay","expect var autoPlay: Boolean","app.lexilabs.basic.sound.Audio.autoPlay"]},{"name":"expect var resource: String","description":"app.lexilabs.basic.sound.Audio.resource","location":"basic-sound/app.lexilabs.basic.sound/-audio/resource.html","searchKeys":["resource","expect var resource: String","app.lexilabs.basic.sound.Audio.resource"]},{"name":"interface AudioBuilder","description":"app.lexilabs.basic.sound.AudioBuilder","location":"basic-sound/app.lexilabs.basic.sound/-audio-builder/index.html","searchKeys":["AudioBuilder","interface AudioBuilder","app.lexilabs.basic.sound.AudioBuilder"]},{"name":"interface AudioByteBuilder","description":"app.lexilabs.basic.sound.AudioByteBuilder","location":"basic-sound/app.lexilabs.basic.sound/-audio-byte-builder/index.html","searchKeys":["AudioByteBuilder","interface AudioByteBuilder","app.lexilabs.basic.sound.AudioByteBuilder"]},{"name":"sealed class AudioState","description":"app.lexilabs.basic.sound.AudioState","location":"basic-sound/app.lexilabs.basic.sound/-audio-state/index.html","searchKeys":["AudioState","sealed class AudioState","app.lexilabs.basic.sound.AudioState"]},{"name":"val message: String","description":"app.lexilabs.basic.sound.AudioState.ERROR.message","location":"basic-sound/app.lexilabs.basic.sound/-audio-state/-e-r-r-o-r/message.html","searchKeys":["message","val message: String","app.lexilabs.basic.sound.AudioState.ERROR.message"]}] diff --git a/docs/index.html b/docs/index.html index 5c1bdce..d872279 100644 --- a/docs/index.html +++ b/docs/index.html @@ -14,11 +14,11 @@ - + - + @@ -31,6 +31,7 @@ +
diff --git a/gradle.properties b/gradle.properties index e0627a3..ed8fb96 100644 --- a/gradle.properties +++ b/gradle.properties @@ -10,6 +10,8 @@ org.gradle.parallel=true #Kotlin kotlin.code.style=official kotlin.js.compiler=ir +kotlin.native.cacheKind.iosArm64=none +kotlin.native.cacheKind.iosSimulatorArm64=none #Android android.useAndroidX=true diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 0176f21..d808b75 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,12 +1,18 @@ [versions] -kotlin = "2.0.21" +kotlin = "2.1.0-Beta1"# "2.0.20" agp = "8.7.1" kotlinx-coroutines = "1.9.0" bcv = "0.16.3" serialization = "1.7.3" dokka = "1.9.20" -compose = "1.7.0" +compose = "1.7.0-rc01" #"1.6.11" +compose-android = "1.7.3" ktor = "3.0.0" +google-play-services-ads = "23.4.0" +annotations = "1.8.2" +ios-deploymentTarget = "13.0" +adMob-cocoapods = "11.9.0" +firebase-cocoapods = "11.1.0" [libraries] kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "serialization"} @@ -21,12 +27,15 @@ ktor-client-ios = { module = "io.ktor:ktor-client-ios", version.ref = "ktor"} ktor-client-okhttp = { module = "io.ktor:ktor-client-okhttp", version.ref = "ktor" } ktor-client-darwin = { module = "io.ktor:ktor-client-darwin", version.ref = "ktor" } ktor-client-resources = { module = "io.ktor:ktor-client-resources", version.ref = "ktor" } - +compose-ui = {module = "androidx.compose.ui:ui", version.ref = "compose-android"} +google-play-services-ads = { module = "com.google.android.gms:play-services-ads", version.ref = "google-play-services-ads"} +annotations = { module = "androidx.annotation:annotation", version.ref = "annotations"} [plugins] multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } android-library = { id = "com.android.library", version.ref = "agp" } kotlinx-binary-compatibility-validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "bcv"} kotlinx-serialization-plugin = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin"} +native-cocoapods = { id = "org.jetbrains.kotlin.native.cocoapods", version.ref = "kotlin" } dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" } composeCompiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } diff --git a/settings.gradle.kts b/settings.gradle.kts index 6b023ec..efe9e44 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,4 +1,5 @@ rootProject.name = "Basic" +include(":basic-ads") include(":basic-images") include(":basic-sound") include(":basic-logging")