I am trying to create a native ad like this:
nativeExpressAdView = new NativeExpressAdView(adUnitId, new AdSize(360, 150), AdPosition.Bottom);
Instead of hardcoding the screen width as 360, I would like to use the full-width available on the device. Smart banners work great for banner ads, but passing AdSize.SmartBanner
as second argument does not work here.
Screen.width
returns actual pixels.
Is there a way to obtain the width in dp that I can pass onto the AdSize constructor?