Package 

Class MetaNativeAdapter

  • All Implemented Interfaces:
    io.cloudx.sdk.CloudXDestroyable , io.cloudx.sdk.adapter.CloudXNativeAdAdapter

    @VisibleForTesting() 
    public final class MetaNativeAdapter
     implements CloudXNativeAdAdapter
                        

    On iOS, FBMediaView exposes runtime-settable properties:

    • fbMediaView.disableFullScreen = YES

    • fbMediaView.shouldStartUnmuted = YES

    • fbMediaView.shouldHideMediaControls = YES

    On Android, MediaView exposes NONE of these as runtime setters. The only available API is NativeAd.NativeOptions, set at NativeAd construction time:

    • options.setDisableFullScreen(true)

    • options.setUnMuteVolume(true)

    • options.setHideMediaControls(true)

    Verified via runtime reflection (Meta Android SDK 6.21.0): MediaView's video-related public methods are limited to: getVideoDuration(), isVideoContent(), setVideoRenderer(MediaViewVideoRenderer)

    Consequence: disableFullScreen and unMuteVolume work via NativeOptions. hideMediaControls is set via NativeOptions but Meta's SDK may not honor it (observed in test mode — controls remain visible). There is no workaround; the Android SDK simply does not provide the same control surface as iOS.

    iOS also implements fullscreen save/restore of shouldHideMediaControls in mediaViewWillEnterFullscreen / mediaViewDidExitFullscreen. This is not possible on Android because MediaView has no runtime getter or setter for this property.

    The toggles are still meaningful: when the publisher changes settings and reloads, new NativeAd instances are constructed with fresh NativeOptions.

    • Method Summary

      Modifier and Type Method Description
      Unit load(CloudXAdapterLoadParams params)
      Unit destroy()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MetaNativeAdapter

        MetaNativeAdapter(Context context, Bundle serverExtras, Map<String, Object> localExtras, String adm, CloudXNativeAdAdapterListener listener, CloudXLogger logger)