New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

admob mediation native render bug #22

Closed
Kyba1985 opened this Issue Apr 18, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@Kyba1985

Kyba1985 commented Apr 18, 2018

Hi , i'm using mopub native render in adapter of recyclerview.

After the first admob native ad is rendered when the app must render the second one the native ad is not shown but is shown only the adv indicator of google.

I think the problem is in the method removeGoogleNativeAdView of GooglePlayServicesAdRenderer.
After a few session of debugger with layout inspector i noticed that this method removes the wrong view from hierarchy to be used on the next bind. The google native app install has a view before che cardview

schermata 2018-04-18 alle 12 19 42

where is rendered the adv and when this method get the view with:

View actualNativeView = ((ViewGroup) adView).getChildAt(0);

it takes the wrong view.

I fixed it with:
View actualNativeView = ((ViewGroup) adView).getChildAt(1);

(update: i cannot test the native content at this time so i can't know the exactly view hierarchy when content native must be show so i change with this:

View actualNativeView = null; for (int i = 0; i < ((ViewGroup) adView).getChildCount(); i++) { View viewChild = ((ViewGroup) adView).getChildAt(i); if (viewChild instanceof CardView) { actualNativeView = viewChild; break; } }

)

Check if is a real bug in your class.
i'm using the playservices version 15.0.0

@chauduyphanvu1

This comment has been minimized.

Contributor

chauduyphanvu1 commented Apr 18, 2018

Confirming receipt. Investigating.

@chauduyphanvu1 chauduyphanvu1 self-assigned this Apr 18, 2018

@chauduyphanvu1

This comment has been minimized.

Contributor

chauduyphanvu1 commented Apr 18, 2018

@rampara Can you take a look and help with this? I quickly checked out the suggested fix and can confirm the issue went away. Was there a recent change in the Mobile Ads SDK that caused this issue? The existing adapter code worked fine previously.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment