public final class

SmaatoSdk

extends Object
java.lang.Object
   ↳ com.smaato.sdk.core.SmaatoSdk

Summary

Public Methods
static Integer getAge()
static boolean getCoppa()
false indicates that ad content should not be treated as child-directed for purposes of COPPA.
static Gender getGender()
static String getKeywords()
static String getLanguage()
static LatLng getLatLng()
static String getRegion()
static String getSearchQuery()
static String getVersion()
static String getZip()
static void init(Application application, Config config)
Initializes the SDK with custom Config.
static void init(Application application)
Initializes the SDK with default Config (log level set to INFO and httpsOnly set to false).
static void setAge(Integer age)
The user’s age.
static void setCoppa(boolean coppa)
false will indicate that ad content should not be treated as child-directed for purposes of COPPA.
static void setGender(Gender gender)
The user's gender.
static void setKeywords(String keywords)
Tags (free text, case insensitive) describing the content: comma separated values.
static void setLanguage(String language)
The user's language represented as two-symbol code according to ISO 639-1.
static void setLatLng(LatLng latLng)
GPS coordinates of the user's location.
static void setRegion(String region)
The region or state, the user is located in.
static void setSearchQuery(String searchQuery)
Query String: A search term entered by the user: comma separated values.
static void setZip(String zip)
The postal code of the user's location.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static Integer getAge ()

Returns
  • The user’s age. The default value is null.
See Also

public static boolean getCoppa ()

false indicates that ad content should not be treated as child-directed for purposes of COPPA.

true indicates that ad content should be treated as child-directed for purposes of COPPA.

Returns
  • coppa flag. The default value is false.

public static Gender getGender ()

Returns
  • The user's gender. The default value is null.

public static String getKeywords ()

Returns
  • Keywords (free text, case insensitive) describing the content: comma separated values. The default value is null.

public static String getLanguage ()

Returns
  • The user's language represented as two-symbol code according to ISO 639-1. The default value is null.

public static LatLng getLatLng ()

Returns
  • GPS coordinates of the user's location. The default value is null.

public static String getRegion ()

Returns
  • The region or state, the user is located in. The default value is null.

public static String getSearchQuery ()

Returns
  • Query String: A search term entered by the user: comma separated values. The default value is null.

public static String getVersion ()

public static String getZip ()

Returns
  • The postal code of the user's location. The default value is null.
See Also

public static void init (Application application, Config config)

Initializes the SDK with custom Config.

SmaatoSdk.init() must be called from your Application.onCreate().

Parameters
application can not be null.
config a Config instance, can be null. If null is passed, then a default Config is used (log level set to INFO and httpsOnly set to false).
Throws
NullPointerException if application parameter is null.

public static void init (Application application)

Initializes the SDK with default Config (log level set to INFO and httpsOnly set to false).

SmaatoSdk.init() must be called from your Application.onCreate().

Parameters
application can not be null.
Throws
NullPointerException if application parameter is null.

public static void setAge (Integer age)

The user’s age. If only a range is available, use the mean average.

Sets the age.

Parameters
age the age to set, can be null.
See Also

public static void setCoppa (boolean coppa)

false will indicate that ad content should not be treated as child-directed for purposes of COPPA.

true will indicate that ad content should be treated as child-directed for purposes of COPPA.

Sets the coppa. If not set, the default value is false.

Parameters
coppa the coppa to set
See Also

public static void setGender (Gender gender)

The user's gender.

Sets the gender.

Parameters
gender the gender to set, can be null.
See Also

public static void setKeywords (String keywords)

Tags (free text, case insensitive) describing the content: comma separated values.

Sets the keywords.

Parameters
keywords the keywords to set, can be null.
See Also

public static void setLanguage (String language)

The user's language represented as two-symbol code according to ISO 639-1.

Sets the language.

Parameters
language the language to set, can be null.
See Also

public static void setLatLng (LatLng latLng)

GPS coordinates of the user's location.

Sets the latLng.

Parameters
latLng the latLng to set, can be null.
See Also

public static void setRegion (String region)

The region or state, the user is located in.

Sets the region.

Parameters
region the region to set, can be null.
See Also

public static void setSearchQuery (String searchQuery)

Query String: A search term entered by the user: comma separated values.

Sets the searchQuery.

Parameters
searchQuery the searchQuery to set, can be null.
See Also

public static void setZip (String zip)

The postal code of the user's location.

Sets the zip.

Parameters
zip the zip to set, can be null.
See Also