Skip to content
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

Native Ad is Broken when loaded Via Custom Adapter #677

Open
SlokeT opened this issue Jun 21, 2024 · 1 comment
Open

Native Ad is Broken when loaded Via Custom Adapter #677

SlokeT opened this issue Jun 21, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@SlokeT
Copy link

SlokeT commented Jun 21, 2024

MAX SDK Version

12.4.2

Device/Platform Info

Android

Current Behavior

When I load a Native Ad via the custom adapter. The Ad is malformed, it does not have the icon and the click through action does not work.
Screenshot 2024-06-19 181805

Expected Behavior

The Native ad should function normally i.e have the icon and should direct to the Ad CTA when clicked.

How to Reproduce

Try to Load a Native Ad via Max Custom Adapter.

Additional Info

Below is the code used to create a Max Native Ad from a Custom Native Ad.

NativeAd.Image icon = nativeAd.getIcon();
                        MaxNativeAd.MaxNativeAdImage iconImage = null;
                        if ( icon != null )
                        {
                            if ( icon.getDrawable() != null )
                            {
                                iconImage = new MaxNativeAd.MaxNativeAdImage( icon.getDrawable() );
                            }
                            else
                            {
                                iconImage = new MaxNativeAd.MaxNativeAdImage( icon.getUri() );
                            }
                        }
                        
final MaxNativeAd maxNativeAd = new MaxNativeAd.Builder()
                                .setAdFormat( MaxAdFormat.NATIVE )
                                .setTitle( nativeAd.getHeadline() )
                                .setBody( nativeAd.getBody() )
                                .setCallToAction( nativeAd.getCallToAction() )
                                .setIcon( iconImage )
                                .setMediaView( mediaView )
                                .build();
@SlokeT SlokeT added the bug Something isn't working label Jun 21, 2024
@SlokeT SlokeT changed the title Native Ad Loaded Via Custom Adapter Native Ad is Broken when loaded Via Custom Adapter Jun 21, 2024
@richashukla23 richashukla23 self-assigned this Jun 21, 2024
@richashukla23
Copy link
Contributor

@SlokeT Are you able to reproduce this in our Demo App - if yes, could you share a sample project where this is reproducible?

@Lorenzo45 Lorenzo45 assigned Lorenzo45 and unassigned richashukla23 Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants