react-native-admob
react-native-admob copied to clipboard
Fluid adSize works for iOS but not for Android
I see support for Fluid adSize for iOS and they are working great for me, Is there a reason the Fluid adSize was not included for Android?
I have been attempting to implement it by setting the adSize to AdSize.FLUID and making the ad call. The call returns the correct fluid creative, but when the onAdLoaded() function is called, the adSize changes to 320x50_mb. I can see the webview in the chrome debugger with the correct creative, but the app is showing a blank 320x50 ad.
I'm not sure where this new adSize is coming from and where my creative is being placed. Any help on this would be greatly appreciated.
Possible duplicate of https://github.com/sbugert/react-native-admob/issues/193
Can you check if the latest release has fixed this?
I have the same issue. Even adding AdSize.FLUID on java file like @JustinKasad did not work...
Did anyone managed to get it working on Android?
From my understanding: the webview used by DFP has a problem, judging by the following lines in the logs :
[GroupMarkerNotSet(crbug.com/242999)!:54468279]GL ERROR : GL_INVALID_OPERATION : "BackFramebuffer::Create: <- error from previous GL command
"Cannot call determinedVisibility() - never saw a connection for the pid:
Maybe because on the example, Native Styles is not handled programatically but it's design to be used with an XML layout file, as you can see on the the docs .
I already tried to configure the layout params programmatically and also to make sure the call is made on the main thread with no luck... The last thing I have to test is to use an XML like on this SO solution .
Btw. the fluid banner doesn't work, both on iOS and Android. (see the example app)
For me fluid banner is working on iOS only.
Fluid banner is now loaded but not rendering all the time. I can see HTML coded generated for fluid banner using WebView debugging, weird thing is it's not rendering. Another issue with Google Ads SDK for android is it always returns 90 height of the fluid banner.
BTW, I added AdSize.FLUID size on java file and extended LinearLayout instead of ReactViewGroup.
Any progress here?
@chengsam
I end up creating my own library that uses WebView to render DFP. This is working fine in my project. It's easy to implement and support Fluid and multiple sizes with custom targeting. Here is the link react-native-google-publisher-tag. Can you please try and let me know?
Did anybody find a fix for it ?