-
Notifications
You must be signed in to change notification settings - Fork 262
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
Cannot show multiple native ads on android with NativeAdFactory (ios works fine) #1076
Comments
Hey @shijianan201, the code you provided has app-specififc language that I cannot infer. Can you please provide a minimum reproducible sample so I can try to replicate this? Thanks! |
Hey @malandr2 I updated my code above, and I found a new issue yesterday, when I use code above,native ad can show only once.It occurs when I placed only one AdCardView in TestNativeAdPage's build function,first time I enter TestNativeAdPage it works fine, but the next time I entered it will show nothing and no Exception throws.The console print like below:
probably because I use filament to show 3d model in my app(I use another platform view to connect filament to show 3d model)? |
@shijianan201 thanks for following up. It's possible although I'm not familiar with filament (we don't support it in our samples) but if you're able to still reproduce the issue without filament let us know and we can begin the debugging process. |
@malandr2 thank you for taking the time, I made a ad test project use pure code without filament, but same as before, ad didn't display when I route to ad page twice. Could you please review my code and figure out why? I also record a video below 20240511-144741.mp4 |
Hi @shijianan201, I'm getting a crash on launch for iOS with error For reference, we don't support Impeller at this time. For Android it looks like you're only loading one native ad (which loads successfully) for one card view. You can confirm this by using ad inspector. Can you update your sample to replicate your issue on Android and resolve the iOS crash so I can take another look. Thanks! |
Hello @malandr2 I disabled impeller on both android and ios in ad test project, and print log in onAdLoaded like below Every time I enter to ad page this log will print with different response id, but same as before,ad only show only once, but I hope to use one native ad unit id gobal to show multiple ads in ListView,how can I do this? My console prints:
|
@malandr2 Any feedback? I find It works fine when I remove factory id. code likes below. This issue only occurs when I want to custom ad style by using NativeAdFactory. |
i used you code as experiment into my project , and it's completely work for me , but it's take 2-3 second to load after come in the screen, it's very annoying thing as user interfere, and also more if internet is normally work then it's took 4-5 second to load native ads. how i load with screen load, so ads take place , we can do that ?? like pre-load a native ads in every called before for multiple time show ads 🤔 |
Really?Could you record a video and comment again? I can not see more than one native ad on my phone when I use NativeAdFactory to custom ad style. |
Finally I move viewbinding new instance in createNativeAd function , it works fine. |
Recorder_29052024_102759.online-video-cutter.com.mp4yeah ,certainly m i attached the video, you can see that , it's can to much to load, i used your code. please if you have any content about that provide. |
If you want to display native ad in ListView, I don't recommend to pre load because It makes lifecycle control difficult, and you may receive crash, otherwise your can cache ads from main function. |
Thanks For responding me, it's glad to me, No bro, it's not a ListView , you can see in video it's complete multiple screens, that are navigate one to another screen just . and my problem is it's take a time to load/display Have we go , DEMO AD:- https://github.com/woxxin20/admob_load.git i create one demo project , please you can check code, like with nagivate to another screen native ads should be present in screen without any delayed or load as soon as fast ad display , please check OUT and Review it |
Plugin Version
ad sdk version:5.0.0,flutter sdk version:3.19.1
I want to display two nativeads on same page,but finally only one ad shows, the second ad throws exception
Steps to Reproduce
Factory code
layout code
Flutter Activity code
flutter code
page code
Expected results:two native ad show normally in screen
Actual results:only one ad show,the other throw exception
Logs
The text was updated successfully, but these errors were encountered: