Android SDK Version
- AbstractAdListener
- Ad
- AdChoicesView
- AdError
- AdIconView
- AdListener
- AdOptionsView
- AdOptionsView.Orientation
- AdSettings
- AdSettings.IntegrationErrorMode
- AdSettings.MultiprocessSupportMode
- AdSettings.TestAdType
- AdSize
- AdView
- AudienceNetworkActivity
- AudienceNetworkAds
- AudienceNetworkAds.AdFormat
- AudienceNetworkAds.InitListener
- AudienceNetworkAds.InitResult
- AudienceNetworkAds.InitSettingsBuilder
- BidderTokenProvider
- CacheFlag
- DefaultMediaViewVideoRenderer
- ExtraHints
- ExtraHints.Builder
- ExtraHints.HintType
- ExtraHints.Keyword
- InstreamVideoAdListener
- InstreamVideoAdView
- InterstitialAd
- InterstitialAdExtendedListener
- InterstitialAdListener
- MediaView
- MediaViewListener
- MediaViewVideoRenderer
- MediaViewVideoRendererWithBackgroundPlayback
- NativeAd
- NativeAd.AdCreativeType
- NativeAdBase
- NativeAdBase.Image
- NativeAdBase.MediaCacheFlag
- NativeAdBase.NativeComponentTag
- NativeAdBase.Rating
- NativeAdLayout
- NativeAdListener
- NativeAdScrollView
- NativeAdScrollView.AdViewProvider
- NativeAdsManager
- NativeAdsManager.Listener
- NativeAdView
- NativeAdView.Type
- NativeAdViewAttributes
- NativeBannerAd
- NativeBannerAdView
- NativeBannerAdView.Type
- RewardData
- RewardedVideoAd
- RewardedVideoAdExtendedListener
- RewardedVideoAdListener
- S2SRewardedVideoAdExtendedListener
- S2SRewardedVideoAdListener
- VideoAutoplayBehavior
- VideoStartReason
- java.lang.Object
- com.facebook.ads.AudienceNetworkAds
public final class AudienceNetworkAds
extends java.lang.Object
The class contains methods that are used across whole Audience Network SDK during lifetime of the application.
initialize(Context)
should be called as early as possible from android.app.Application#onCreate
or from android.app.Activity#onCreate
that contains Ads if you don't use custom android.app.Application
class.Since:
5.1
Nested Class Summary
Modifier and Type | Class and Description |
---|---|
static interface | AudienceNetworkAds.AdFormat Constants that represent Audience Network SDK Ad Formats. |
static interface | AudienceNetworkAds.InitListener The interface that allows receive callback when initialization of the SDK is done. |
static interface | AudienceNetworkAds.InitResult Result of initialization. |
static interface | AudienceNetworkAds.InitSettingsBuilder A builder class that allows to pass additional setting during initialization. |
Method Summary
Modifier and Type | Method and Description |
---|---|
static AudienceNetworkAds.InitSettingsBuilder | buildInitSettings(Context context) Allows initialize the Audience Network SDK with additional settings. |
static int | getAdFormatForPlacement(Context context, java.lang.String placementId) Returns AudienceNetworkAds.AdFormat for the placement. |
static java.lang.String | getAdsProcessName(Context context) Returns name of Ads Process in format ":PROCESS_NAME". |
static void | initialize(Context context) Initialize the Audience Network SDK. |
static boolean | isInAdsProcess(Context context) Verifies if current process is process created by Audience Network SDK. |
static boolean | isInitialized(Context context) Returns true if Audience Network SDK has been already initialized. |
Method Detail
initialize
public static void initialize(Context context)
Initialize the Audience Network SDK.
Parameters:
context
- The Context of the application.Since:
5.1
isInAdsProcess
public static boolean isInAdsProcess(Context context)
Verifies if current process is process created by Audience Network SDK. You should call this method from
android.app.Application#onCreate
method. Typically you would like to skip any other initialization work in your android.app.Application
class if current process is Audience Network SDK process.Returns:
boolean Whether process is created by Audience Network SDK.
Since:
5.1
getAdsProcessName
public static java.lang.String getAdsProcessName(Context context)
Returns name of Ads Process in format ":PROCESS_NAME".
Returns:
ads process name.
Since:
5.3
isInitialized
public static boolean isInitialized(Context context)
Returns true if Audience Network SDK has been already initialized. If you initialize SDK in Activity.onCreate() method, you might want to use it to avoid calling method twice.
Returns:
if SDK has been initialized.
Since:
5.3
buildInitSettings
public static AudienceNetworkAds.InitSettingsBuilder buildInitSettings(Context context)
Allows initialize the Audience Network SDK with additional settings.
Parameters:
context
- The Context of the application.Since:
5.2
getAdFormatForPlacement
public static int getAdFormatForPlacement(Context context, java.lang.String placementId)
Returns
AudienceNetworkAds.AdFormat
for the placement.Parameters:
context
- a Context
.placementId
- the placement id.Returns:
integer that corresponds to one of constants in
AudienceNetworkAds.AdFormat
.Since:
5.3