Actions

NativeTarget SDK4.2.3

From TyrooLabs

Contents

Overview

  • New Ad formats introduced. Interstitial ( Webview and Native Support ), News Feed- (native and web view support)
  • Preloading and caching for faster Ad serving. Ads to be prefetched and stored, before user can access it for better user experience


Nativeimage.png
,
InstreamJStag.png
,
Instreambrandbanner.png



Monetize

How monetization works ?

Integrate-SDK.png
Step 1

Register your app with TyrooCentral and manage Ad rules and Placements from the interface.

Decide-on-ad-platform.png
Step 2

Decide the Ad format- Shopping Layout, interstitial,Grid Wall, Instream Ads while creating the placement and the Ad type- App install or Product Listing Ads while creating the rules through interface.

User-views-the-ad.png
Step 3

Ads based on optimization algorithm and your preferences is served to the user. User views the Ad ,clicks on it and perform actions like Purchase or install.

You-earn-revenue.png
Step 4

Track your earnings from TyrooCentral interface real time or integrate postbacks if you want to track it in your own platform.

Demo Application

Please download the demo apk from here

Steps to Integrate the new version 4.2.3

STEP 1:Register App on TyrooCentral

1.Go to TyrooCentral site or click here.
2.Login with your TyrooCentral username and password
3.Click on the Mobile tab
4.Click on the “Register New App” tab.
4.png
5.Fill app details and save.Fill the color that you want to use for the headers, Font size for Section Titles and Ads.Also fill the Shopping Section Title and upload the search, back and loading images ( for Shopping Section Layout ). If no image is uploaded default images will be served.
Font.JPG

STEP 2: Hashcode Generation

Hashcode is required for making any API call. Without proper hashcode , no response will be given by the API.The hashcode can be generated by clicking on the button "Generate Hashcode" as shown below. The generated hashcode has to be used while making a request from your side shown in section-


HASH1.jpg


HASH2.jpg


STEP 3: Integrate NativeTarget SDK AAR File

STEP 4 : Method Calls

Methods required to be called for displaying ads at one placement

In order to display ads at a certain placement, following methods needs to be called. In case you have two placements inside an applciation where you want to display ads, then the entire set of methods need to be called again with the new placement id.


Add AdView to the layout

1. JS Tag view or Brand Banner ads occupies only a portion of the screen. You need to add com.nt.sdk.tyroo.ui.views.AdView element to your xml layout.

<com.nt.sdk.tyroo.ui.views.AdView

       android:id="@+id/adlayout"
       android:layout_width="match_parent"
       android:layout_height="wrap_content">


Create an instance of AdView

2. Open your Java Activity file and create an instance of AdView.


AdView adLayoutOne;


.....

@Override

   	protected void onCreate(Bundle savedInstanceState) {
       	super.onCreate(savedInstanceState);
       	setContentView(R.layout.activity_main);
       	adLayout = (AdView) findViewById(R.id.adlayout);

.....

}

Preload Ads

3. After creating AdView instance you need to call SDK preload method before display ads.


@Override

   	protected void onCreate(Bundle savedInstanceState) {
       	super.onCreate(savedInstanceState);
       	setContentView(R.layout.activity_main);
       	adLayout = (AdView) findViewById(R.id.adlayout);

.....

MainActivity.preLoadAds(getApplicationContext(), PLACEMENTID_ONE, HASHCODE, PACKAGE_NAME, getPreloadCallback());

}


public static void preLoadAds(Context context, String placementId, String hashCode, String packageName, PreloadCallback<Boolean> preloadCallback) {


InitiateTyrooSdk sdk = new InitiateTyrooSdk(context);

sdk.setPlacementId(placementId);

sdk.setHashcode(hashCode);

sdk.setPackageName(packageName);

sdk.setDynamicPlacement("true");

sdk.setPreloadCallback(preloadCallback);

sdk.preloadAds(context);

   }

//Preload callback method public PreloadCallback<Boolean> getPreloadCallback() {

       return new PreloadCallback<Boolean>() {
           @Override
           public void onSuccess(Boolean result) {
               Log.e("Tyroo-preLoadCallback", "onSuccess");
           }


           @Override
           public void onFail(Boolean result) {
               Log.e("Tyroo-preLoadCallback", "onFail");


           }
       };
   }


Display Ads

MainActivity.displayAds(getApplicationContext(), adLayoutOne, PLACEMENTID_ONE, HASHCODE, PACKAGE_NAME, getCallBack());


.....


private ICallback<Boolean> getCallBack() {

       	return new ICallback<Boolean>() {
      		     @Override
      		     public void onRequest(Boolean result) {
       	        Log.e("Tyroo-callback", "request");
       	     }


           	     @Override
                    public void onRenderStart(Boolean result) {
                    	Log.e("Tyroo-callback", "onRenderStart");
           	     }


                    @Override
           	     public void onPageDisplayed(Boolean result) {
                    	Log.e("Tyroo-callback", "onPageDisplayed");
           	}


           	@Override
           	public void onFail(Boolean result) {
               	Log.e("Tyroo-callback", "onFail");
           	}
       };
   }




Method Arguments Definations
context context of the Application.
Placement Id Kindly obtain your Placement Id from Tyroo Account Manager or create on your own-[Manage Placements]
Hashcode Generate hashcode using steps in current documentation.
Package Name Package name of the Application.
Dynamic Placement This needs to be set true(in string like "true") for all cases.

Dependencies Required

Include the following libraries in the gradle (application),if app is using compileSdkVersion 25 and buildToolsVersion '25.0.2'

Library Name Contribution towards Increase in App Size
compile "com.android.support:cardview-v7:25.3.1" 16Kb
compile (name: 'tyroo-release_4.2.2', ext:'aar') 123 Kb
compile "com.android.support:recyclerview-v7:25.3.1" 400 Kb

If the developer is already using the above libraries, he should not include it once again and this will lead to decrease in app size accordingly. For example, if an app developer is already using library- "com.android.support:recyclerview-v7:25.3.1" or "com.android.support:cardview-v7:25.3.1", then he should not include it once again.


Include the following libraries in the gradle (application),if app is using compileSdkVersion 23 and buildToolsVersion '23.0.2'

Library Name Contribution towards Increase in App Size
compile "com.android.support:cardview-v7:23.0.2" 20Kb
compile (name: 'tyroo-release_4.2.2', ext:'aar') 123 Kb
compile "com.android.support:recyclerview-v7:23.0.2" 430 Kb

If the developer is already using the above libraries, he should not include it once again and this will lead to decrease in app size accordingly. For example, if an app developer is already using library- "com.android.support:recyclerview-v7:23.0.2" or "com.android.support:cardview-v7:23.0.2", then he should not include it once again.

Manage Placements

Placements are a way to render the Ads. There are two kind of placements- parent placement and sub placement. Parent placement contains sub placement . One parent placement can contain multiple sub placements with a defined priority for the sub placements. Priority decides the order in which sub placements will be arranged in a layout.

Also each sub placement has an associated rule which dictates whether PLA ,APP install or Brand Ads will be served and what is the no of ads that needs to be served. To know more about it refer- [Rules and Apps]


Shop Look

Add Placement: Create a new placement for Shopping Section Layout

  1. Select the App
  2. Give the Parent Placement a name
  3. Chose Placement source as SDK
  4. Select Ad format type as- Shopping ( for Activity mode ) or Shopping Layout ( For Fragment Mode)
  5. Select further sub placements for shopping tab. In total 9 sub placements needs to be selected.For shopping section further 9 sub- placements will be attached to the main placement with below priority list
Sub Placement Name Priority Ad format Type
471 by 181 Banner 1 Image Banner
Top Deal/Trendign Now 2 Grid carousel
Handpicked 3 Grid carousel
300 by 250 banner 4 Image Banner
Fashion 5 Grid Wall Activity
Mobile 6 Grid Wall Activity
Home 7 Grid Wall Activity
Electronics 8 Grid Wall Activity
Search 9 Grid Wall Activity


Adplacement.JPG

Interstitial

  1. Select the App
  2. Give the Parent Placement a name
  3. Chose Placement source as SDK
  4. Select Ad format type as- Image Interstitial
  5. Select further sub placements for Image Interstitial. One Sub placement will be chosen from the Select placement list


Sub Placement Name Priority Ad format Type
Full Page Interstitial 1 Image Interstitial

Interstisial.JPG


Grid Wall Activity

  1. Select the App
  2. Give the Parent Placement a name
  3. Chose Placement source as SDK
  4. Select Ad format type as- Image Interstitial
  5. Select further sub placements for Grid Wall Activity. One Sub placement will be chosen from the Select placement list


Sub Placement Name Priority Ad format Type
Best Deals 1 Grid Wall Activity

GridWallActivity.JPG

How to create sub placement

  1. Select the App
  2. Give the Placement a name
  3. Choose Placement source as SDK
  4. Select Ad format type as- Grid Wall Activity, Grid carousal, Image Interstitial or Image Banner
  5. In Rule option select- Rules
  6. In Select Rules- choose the rule name


Subplacement.JPG

Rules and Apps

A rule helps in deciding what kind of Ads PLA ,App install or Brand Ads will be served on a placement.Following sections will list down , how one can create and manage rules


Manage Ad Rules

How to create a new Rule

A new rule can be created by clicking on the "Add Rule" button.

Addrule7.PNG


On the displayed pop up, preferences can be chosen like whether you want to served Install Ads, Product Listing Ads or both.


When Install Ad is selected , you can choose the following

  • Campaigns for which you want to serve the Ads
  • Campaign category
  • Language in which you want to serve the Ads

Installads.PNG


When Product Ad is selected, you can choose the following

  • Campaigns for which you want to serve the Ads

PLA.PNG

Activate/Deactivate the Rule

A rule can be activated or deactivated , by selecting the rule and clicking on the "Activate Rule" or "Deactivate Rule " button.

Activate Rule Activaterule.PNG


Deactivate Rule


Deactivaterule.PNG

View the Rules filters

View filters.PNG


View the Apps on which the the rule is applied

Viewapps.PNG

Filters

These filter will help you filter rules by their status

Filter.png