yandexmobile / yandex-ads-sdk-android

Other
78 stars 22 forks source link

Not able to add Yandex to Admob mediation #195

Closed maxakash closed 1 year ago

maxakash commented 1 year ago

Hi I am trying to add Yandex native ads to my android application via Admob mediation. But while following the documentation (https://yandex.com/dev/mobile-ads/doc/android/adapters/admob-adapter.html), I am getting some errors.

I am not able to import "YandexNative" and "YandexNativeAdAsset" classes and the error I get is

Cannot access 'YandexNative': it is internal in 'com.admob.mobileads'
Cannot access 'YandexNativeAdAsset': it is internal in 'com.admob.mobileads.nativeads'

The library versions I am using are

 implementation 'com.yandex.android:mobileads:5.6.0'
 implementation 'com.yandex.ads.adapter:admob-mobileads:5.6.0.0'
 implementation 'com.google.android.gms:play-services-ads:21.5.0'

Please help.

beetlea commented 1 year ago

i have too problem, but with library com.yandex i dont import this library

mobile-ads-github commented 1 year ago

Hi, thank you very much for the report. We will fix it in the next release at the end of the week.

maxakash commented 1 year ago

@mobile-ads-github I am using the library

        implementation 'com.yandex.ads.adapter:admob-mobileads:5.7.0.0'
        implementation 'com.yandex.android:mobileads:5.7.0'

But after using custom event in Admob(following documentation), Yandex adapter is not found in the app. I have correctly used the proguard rules.

Here is the error WhatsApp Image 2023-04-02 at 9 56 36 AM

Here is the Custom even configuration

Screenshot 2023-04-02 at 10 42 58 AM
mobile-ads-github commented 1 year ago

Hello!

We checked whether Ad inspector really gives an integration error. This is due to using of deprecated API in the adapter. We will fix this in future versions . Nevertheless, the adapter works, and the integration can be checked by running a Single ad source test: selection of Yandex adapters is available. After the test, the selection information will be visible in the SDK request log in a specific Ad unit.

Thanks a lot for the highlighted problem!

maxakash commented 1 year ago

Hello!

We checked whether Ad inspector really gives an integration error. This is due to using of deprecated API in the adapter. We will fix this in future versions . Nevertheless, the adapter works, and the integration can be checked by running a Single ad source test: selection of Yandex adapters is available. After the test, the selection information will be visible in the SDK request log in a specific Ad unit.

Thanks a lot for the highlighted problem!

Thanks for your help. But some the native ad asset which are mandatory by Yandex are optional for Admob. So what am I supposed to do?

mobile-ads-github commented 1 year ago

That is right, Yandex Ads has extra mandatory assets. You should provide extra views to support them. You can find instruction for this here: https://yandex.com/dev/mobile-ads/doc/android/adapters/admob-adapter.html#load-show. Please note list of mandatory assets there.

Also you can find explanation for Yandex assets here: https://yandex.com/dev/mobile-ads/doc/android/quick-start/components-android.html