Native Ads

Adobe Air Native Ads ad unit

🚧

Before you begin!

Make sure that you have completed the Adobe Air Plugin installation before you begin integrating the Native Ads ad unit
Currently the Native Ads ad unit is available for Android apps only

Integrating the Native Ads ad unit

Step 1: Load The Native Ad

var nativeAd:NativeAd = new NativeAd("ADD_HERE_YOUR_PLACEMENT_ID");
nativeAd.addEventListener(AdEvent.AD_LOADED, adLoadedHandler);
nativeAd.loadAd(new NativeAdRequest()
 // optional - config your ad request:                 
 .setPostback("")
 .setCategories("")
 .setCachingPolicy(NativeAdRequest.CACHING_POLICY_ALL)
 .setCreativeType(NativeAdRequest.TYPE_ALL)
 .setVideoLength(NativeAdRequest.VIDEO_LENGTH_SHORT)
 .setVideoQuality(NativeAdRequest.VIDEO_QUALITY_HIGH)
);

function adLoadedHandler(event: Event): void {
// ...
}

Step 2: Configure the NativeAdRequest (Optional)

By default, the native ad settings will be loaded with pre-defined settings. You can change these settings by defining the NativeAdRequest object

  • setCategories - String. Set preferred ad categories
  • setPostback - String. Postback parameters that will be posted to your server after user installed an app (make sure to encode the values)
  • setCachingPolicy - Appnext supports four caching options when loading the native ad;
    • NativeAdRequest.CACHING_POLICY_ALL - The video and wide image will be cached before showing the ad (Default)
    • NativeAdRequest.CACHING_POLICY_NOTHING - No caching at all
    • NativeAdRequest.CACHING_POLICY_VIDEO_ONLY - Only the video in the creative will be cached
    • NativeAdRequest.CACHING_POLICY_STATIC_ONLY - Only the wide image will be cached. None cached assets will be streamed
  • setCreativeType - The native ad can filter the ad content based on this setting;
    • NativeAdRequest.TYPE_ALL - Both video and static (Default)
    • NativeAdRequest.TYPE_VIDEO_ONLY - Ads with video type creative only
    • NativeAdRequest.TYPE_STATIC_ONLY - Ads with static type creative only
  • setVideoLength - Sets the preferred length of the ad video creative
    • NativeAdRequest.VIDEO_LENGTH_SHORT - Up to 15 seconds long videos (Default)
    • NativeAdRequest.VIDEO_LENGTH_LONG - 20-60 seconds long videos
  • setVideoQuality - Sets the preferred quality of the ad video creative
    • NativeAdRequest.VIDEO_QUALITY_HIGH - Video will load in a high quality
    • NativeAdRequest.VIDEO_QUALITY_LOW - Video will load in a low quality (Default)

Step 3: Methods

  • getAdTitle - This function fetches the Ad title (String, up to 25 characters)
  • getAdDescription - This function fetches the Ad description (String, up to 90 characters)
  • getCTAText - This function fetches the Ad Call-To-Action string (String)
  • getStoreDownloads - This function fetches the number of downloads the advertisement's app (String)
  • getStoreRating - This function fetches the store rating of advertisement's app (String)
  • getIconURL - This function fetches icon URL of advertisement's app (String)
  • getWideImageURL - This function fetches image URL of advertisement's app (String)
  • getVideoUrl - This function fetches video URL from advertisement's app (String)
  • click - If Flash/Starling sprite or Flex/Feathers controls are in use, please use this function to trigger a click event (opens the store related to the ad). We highly recommend using the "native" Android SDK registerClickableViews function

Step 4: Configure the Appnext Privacy Policy Icon

By default the native ads ad unit will place an "i" icon representing Appnext Ads privacy policy. Clicking it will open Appnext Privacy Policy landing page on the device browser

The following functions are available to control the position and the color of the icon:

  • nativeAd.setPrivacyPolicyPosition - Controls on which corner of the nativeAd view the icon will show. Possibe values:
    • PrivacyIcon.PP_ICON_POSITION_TOP_RIGHT - Icon is located in the top-right corner of the view (Default)
    • PrivacyIcon.PP_ICON_POSITION_TOP_LEFT - Icon is located in the top-left corner of the view
    • PrivacyIcon.PP_ICON_POSITION_BOTTOM_RIGHT - Icon is located in the bottom-right corner of the view
    • PrivacyIcon.PP_ICON_POSITION_BOTTOM_LEFT - Icon is located in the bottom-left corner of the view
  • nativeAd.setPrivacyPolicyColor - Controls the color texture of the "i" icon
    • PrivacyIcon.PP_ICON_COLOR_DARK - The icon is shown with a dark texture
    • PrivacyIcon.PP_ICON_COLOR_LIGHT - The icon is shown with a light texture (Default)

App Categories

1. Action
2. Adventure
3. Arcade
4. Arcade & Action
5. Board
6. Books & Reference
7. Brain & Puzzle
8. Business
9. Card
10. Cards & Casino
11. Casino
12. Casual
13. Comics
14. Communications
15. Education
16. Educational
17. Entertainment
18. Family
19. Finance
20. Health & Fitness
21. Libraries & Demo
22. Lifestyle
23. Live Wallpaper
24. Media & Video
25. Medical
26. Music
27. Music & Audio
28. News & Magazines
29. Personalization
30. Photography
31. Productivity
32. Puzzle
33. Racing
34. Role Playing
35. Shopping
36. Simulation
37. Social
38. Sports
39. Sports Games
40. Strategy
41. Tools
42. Travel & Local
43. Trivia
44. Weather
45. Word

Integration Support

Should you have any problems integrating the product, log a ticket with us by emailing [email protected].