Suggested Apps

Ad Unit Integration

📘

SDK Installation

  • "Suggested Apps" Ad unit is supported only from SDK version 2.4.7.*
  • Make sure to Install the SDK in your Android Studio project as described here

Before you start make sure you have the following requirements:

  • SDK version 2.4.7+
  • SDK already implemented

Step 1: Add "Suggested App" Ad Unit to Layout XML

<com.appnext.nativeads.designed_native_ads.views.AppnextDesignedNativeAdView
    android:id="@+id/designed_native_ads"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"/>

Available sizes for the Suggested Apps

Ad unit height sizeAvailability
50will be available soon
100available
250will be available soon

Step 2: Load "Suggested App" Ad Unit

AppnextDesignedNativeAdView appnextDesignedNativeAdView = findViewById(R.id.designed_native_ads);
appnextDesignedNativeAdView.load("<PLACE_YOUR_PLACEMENT_ID_HERE>", new AppnextDesignedNativeAdViewCallbacks() {
	@Override
    public void onAppnextAdsLoadedSuccessfully() {
  }
  
  @Override
  	public void onAdClicked(AppnextDesignedNativeAdData appnextDesignedNativeAdData) {
  }
   
  @Override
    public void onAppnextAdsError(AppnextError error) {
  }
});
  • Make sure to make the adunit available in the view hierarchy
  • Make sure to provide a valid Appnext placement id

That's it ! now it should work , if you wish to change any layout parameters please follow the steps below

Step 3: Advanced configuration: (Optional)

by adding the following configurations to layout XML, you would be able to control part of the visual parameters

///xml
xmlns:appnext="http://schemas.android.com/apk/res-auto"
appnext:title="Recommended Apps"
appnext:titleColor="@android:color/holo_blue_bright"
appnext:presentAppTitles="true"
appnext:transparency="80"
appnext:backgroundColor="@android:color/darker_gray"
appnext:localDirection="true"
appnext:amountOfApps="5" ///value can be between 2-5
appnext:titleTextSize="11sp" // value can be between 11sp and 18sp

Example Project

You can download an example project (Android Studio) from our Github page here.

Integration Support

if you encounter any problems integrating the product, please submit a request for support emailing [email protected]