Open SlokeT opened 1 week ago
12.4.2
Android
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.
The Native ad should function normally i.e have the icon and should direct to the Ad CTA when clicked.
Try to Load a Native Ad via Max Custom Adapter.
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 Are you able to reproduce this in our Demo App - if yes, could you share a sample project where this is reproducible?
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](https://github.com/AppLovin/AppLovin-MAX-SDK-Android/assets/126227458/59fbbbe3-3118-496e-b36a-5113fa6ce38d)
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.