Skip to main content

useAppOpenAd

Use this hook to use App Open Ad with its various states.

Returns

Type
object

Properties:

NameTypeDescription
adLoadedbooleanWhether your ad is loaded and ready to present.
adPresentedbooleanWhether your ad is presented to user. The value remains true until new ad is requested.
adDismissedbooleanWhether your ad is dismissed. The value remains true until new ad is requested.
adShowingbooleanWhether your ad is showing. The value is equal with adPresented && !adDismissed.
adLoadErrorAdErrorAdError object throwed during ad load.
adPresentErrorAdErrorAdError object throwed during ad present.
loadFunctionLoads new ad.
showFunctionShows loaded ad. Ad must be loaded prior to this call.
tip

Note that adPresented value remains true after the ad is dismissed. The value changes to false when ad is initialized via load(). To determine whether the ad is showing, use adShowing value.

caution

When using with loadOnDismissed option to true, changed adDimissed value will appear for a very short time and initialized to false as derived states are initialized just after new ad is requested.