create

open fun create(@NonNull context: Context, @NonNull applicationIdentifier: String): AdManager

Creates a new AdManager instance which stores its data in internal storage. Note that it is not currently safe to create multiple AdManager instances.

Return

An AdManager instance.

Parameters

context

A Context instance.

applicationIdentifier

Your application's Ads identifier. Ensures that you get the correct slot ads, and that analytics functions correctly.


open fun create(@NonNull context: Context, @NonNull applicationIdentifier: String, @NonNull dataDirLocation: StorageOption): AdManager

Creates a new AdManager instance, with an option to choose Ads' data storage location. Note that it is not currently safe to create multiple AdManager instances.

Return

An AdManager instance.

Parameters

context

A Context instance.

applicationIdentifier

Your application's Ads identifier. Ensures that you get the correct slot ads, and that analytics functions correctly.

dataDirLocation

The location for Richie Ads' data. Either internal or external storage. External in this case means an SD card, if it's available. Check first if external storage is available with availableStorageOptions. If this changes between launches, all old data on the old location will be deleted automatically. Throws IllegalArgumentException if EXTERNAL is given when an SD card isn't mounted.