public void onRewardedVideoCompleted() Error: method does not override ...

150 views
Skip to first unread message

Slavomir Fabian

unread,
Nov 15, 2019, 12:07:56 PM11/15/19
to Google Mobile Ads SDK Developers
Hi,
I have just started to implement  Admob Rewarded Video.
I am reading instruction from google site

Rewarded Video Ads (Legacy API) - https://developers.google.com/admob/android/rewarded-video?hl=en-US





"
...

@Override
public void onRewardedVideoStarted() {
   
Toast.makeText(this, "onRewardedVideoStarted", Toast.LENGTH_SHORT).show();
}

@Override
public void onRewardedVideoCompleted() {
   
Toast.makeText(this, "onRewardedVideoCompleted", Toast.LENGTH_SHORT).show();
} "



It looks like 
onRewardedVideoCompleted()   missing 
Error: Method does not override method from its superclass

Could you check it?


Best Regards

S.F.




Mobile Ads SDK Forum Advisor Prod

unread,
Nov 15, 2019, 2:47:45 PM11/15/19
to slavo....@gmail.com, google-adm...@googlegroups.com
Hi Fabian, 

The RewardedVideoAdListener class has the onRewardedVideoAdClosed() method which is called when the rewarded video ad is closed. I was able to compile the code sample without any issues. Please refer to this code snippet for the callback implementation. If you're having any issues, could you please share the error you're receiving along with the code snippets of your implementation redacting sensitive information, to investigate further?

Thanks,
Bharani Cherukuri
Mobile Ads SDK Team

ref:_00D1U1174p._5001UOCFOZ:ref

Slavomir Fabian

unread,
Nov 16, 2019, 4:00:57 AM11/16/19
to Google Mobile Ads SDK Developers
Hi,
I am writting about onRewardedVideoAdCompleted not ...Closed

My Android Studio find an errror - see attachement.
2019-11-16 (2).png

Mobile Ads SDK Forum Advisor Prod

unread,
Nov 18, 2019, 11:50:52 AM11/18/19
to slavo....@gmail.com, google-adm...@googlegroups.com
Hi Fabian, 

Thank you for clarifying this. It looks like you're using the legacy Rewarded API callbacks. It is recommended that the publishers use the new Rewarded API to load the ads. Please note that the new API does not include these callbacks and were intentionally left out of the new rewarded API. The callbacks were not actionable for apps outside of logging. And all of these stats on video starts, completions, and clicks are available in AdMob reports.

Let me know if you have any further questions. 

Regards,

Slavomir Fabian

unread,
Nov 20, 2019, 6:02:17 AM11/20/19
to Google Mobile Ads SDK Developers
Hi,
using new Rewarded Api works on your new simple example, but not at the more complex older project.
It looks like
implementation 'com.google.android.gms:play-services-ads:18.2.0'

makes problems with older libraries and i am able to use only 16.0.0 version now, without a compilation error.
It is probably because androidx.

ERROR: Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
    is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
    Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:22:5-82:19 to override.

I was looking for, how to solve this problem browsing internet,but nothing works for me, only to use older 16.0.0 version and older Rewarded API.

Mobile Ads SDK Forum Advisor Prod

unread,
Nov 20, 2019, 1:50:39 PM11/20/19
to slavo....@gmail.com, google-adm...@googlegroups.com
Hi Fabian, 

You may refer to this blog post to migrate your applications to v18.0.0 and later. If you're having an issue resolving the dependencies independent to your application, we suggest that you post your concern on other developer forums like StackOverflow. Let me know if you have any other questions. 
Reply all
Reply to author
Forward
0 new messages