question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Get rewared event in Ionic Capacitor

See original GitHub issue

Describe the bug I tried to get a callback if the reward was successfully and what item was rewared. For this I tried different ways like:

  • AdMobPlus.addEventListener(…) -> But here I get the error message that property ‘addEventListener’ does not exist on type ‘AdMobPlusPlugin’
  • Then I tried it with rewared.reward -> But here I get the error message that property ‘reward’ does not exist on type ‘RewardedAd’
  • I also tried document.addEventListener(‘admob.rewarded.dismiss’ …) -> But it’s never reached

Expected behavior An easy and quick way in Capacitor to handle rewards.

Environment

  AdMob Plus Environment Info:
    System:
      OS: macOS Big Sur 11.2.3
      CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
      Memory: 6.06 GB / 64.00 GB
      Shell: 5.8 - /bin/zsh
    Binaries:
      Node: 14.17.0 - /usr/local/bin/node
      npm: 6.14.13 - /usr/local/bin/npm
    Managers:
      CocoaPods: 1.10.0 - /usr/local/bin/pod
    Utilities:
      Clang: 12.0.5 - /usr/bin/clang
    SDKs:
      iOS SDK:
        Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
    IDEs:
      Android Studio: 4.2 AI-202.7660.26.42.7351085
      Xcode: 12.5/12E262 - /usr/bin/xcodebuild
    Languages:
      Java: 15.0.2 - /usr/local/opt/openjdk/bin/javac
    npmPackages:
      typescript: ~4.0.2 => 4.0.7 
    npmGlobalPackages:
      cordova: 10.0.0
    Cordova:
      Version: 10.0.0
    Ionic:
      Version: 6.16.1
    AndroidManifest.xml:
      Version: -

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
ratsoncommented, May 28, 2021

@kisimediaDE Would you prepare a test repo for me to check?

0reactions
kisimediaDEcommented, Aug 28, 2022

Hey from what I found about the SDK from Google is that this it is not possible and no wanted feature from Google. So I don’t think, that this plug-in can support it.

Source:

Read more comments on GitHub >

github_iconTop Results From Across the Web

App | Capacitor Documentation
The App API handles high level App state and events. For example, this API emits events when the app enters and leaves the...
Read more >
Adding AdMob to Your Ionic App with Capacitor - YouTube
Make more money from your Ionic app by integrating AdMob ads using Capacitor ! Learn Ionic faster with the Ionic Academy: ......
Read more >
Rewarded Ad | AdMob Plus
Usage​ · { AdMobPlus, RewardedAd } from '@admob-plus/capacitor' · (async () => { · const rewarded = new RewardedAd({ · : 'ca-app-pub-3940256099942544/5224354917',
Read more >
Wait for AdMob free reward video event inside a function ...
I have a function that checks if the user saw or need to see a reward video to be able to use a...
Read more >
This is Ionic Capacitor native AdMob plugin for IOS & Android
Open your Ionic Capacitor App in Android Studio, Now open MainActivity.java of your app and Register AdMob to Capacitor Plugins. // Other imports......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found