I am using UnifiedNativeAd to display native ad. How can I know if it's NativeAppInstallAd or NativeContentAd?
As per AdMob native ads policy compliance checklist, NativeAppInstallAd should always display Call To Action button while NativeContentAd doesn't need to show it (and indeed I don't show it due to my design of the native ad).
Use
UnifiedNativeAdView adViewas layout root of native ad, you can judge from some getter ofUnifiedNativeAd nativeAdand inject the value:The code above is a part of google admob example project: googleads / googleads-mobile-android-examples, you could clone it and reset to earlier commit, it would really help.