Adrop
Class for initializing the Adrop SDK and managing global settings.initialize
production(boolean): Production mode (true: production, false: development)targetCountries(string[], optional): Target country code array (default: [])useInAppBrowser(boolean, optional): Whether to use in-app browser (default: false)
setUID
uid(string): Unique user identifier
setTheme
theme(AdropTheme): Theme value (‘light’, ‘dark’, ‘auto’)
AdropTheme
Constant object for specifying app theme.light: Light themedark: Dark themeauto: Follow system setting
AdropErrorCode
Error codes that may occur during ad loading and display.network: Network errorinternal: Internal errorinitialize: SDK initialization errorinvalidUnit: Invalid ad unitnotTargetCountry: Not a target countryinactive: Deactivated adadNoFill: No ad availableadDuplicated: Duplicate ad load requestadLoading: Ad is loadingadEmpty: Ad is emptyadShown: Ad already shownadHideForToday: Ad hidden for todayadLandscapeUnsupported: Landscape mode not supportedundefined: Undefined error
AdropBanner
React component for displaying banner ads.Props
style(object, required): Banner style (including height and width)unitId(string, required): Ad unit IDuseCustomClick(boolean, optional): Custom click handling (default: false)adSize(object, optional): Ad size settingautoLoad(boolean, optional): Auto load (default: true)onAdReceived(function, optional): Called on ad receptiononAdImpression(function, optional): Called on ad impressiononAdClicked(function, optional): Called on ad clickonAdFailedToReceive(function, optional): Called on ad reception failure
Methods
load()AdropBannerMetadata
AdropNativeAd
Class for managing native ads.Constructor
unitId(string): Ad unit IDuseCustomClick(boolean, optional): Custom click handling (default: false)
Properties
isLoaded (readonly)Methods
load()AdropNativeProperties
AdropNativeAdListener
AdropInterstitialAd
Class for managing interstitial ads.Constructor
unitId(string): Ad unit ID
Properties
isLoaded (readonly)Methods
load()AdropRewardedAd
Class for managing rewarded ads.Constructor
unitId(string): Ad unit ID
Properties
Same properties as AdropInterstitialAd.Methods
Same methods as AdropInterstitialAd. Example:AdropPopupAd
Class for managing popup ads.Constructor
unitId(string): Ad unit IDcolors(AdropPopupAdColors, optional): Popup color customizationuseCustomClick(boolean, optional): Custom click handling (default: false)
Methods
load()AdropPopupAdColors
closeTextColor(string, optional): Close button text colorhideForTodayTextColor(string, optional): ‘Hide for today’ text colorbackgroundColor(string, optional): Background color
AdropListener
Listener interface for receiving ad events.onAdReceived: Ad reception completeonAdClicked: Ad clickedonAdImpression: Ad impressiononAdFailedToReceive: Ad reception failedonAdDidPresentFullScreen: Full-screen ad presentedonAdWillPresentFullScreen: Full-screen ad about to presentonAdDidDismissFullScreen: Full-screen ad dismissedonAdWillDismissFullScreen: Full-screen ad about to dismissonAdFailedToShowFullScreen: Full-screen ad failed to showonAdEarnRewardHandler: Reward earned (rewarded ads only)
useAdropInterstitialAd
Manages interstitial ads with a React Hook.Signature
unitId(string | null): Ad unit ID
load: Ad load functionshow: Ad show functionreset: State reset functionisClicked: Click statusisClosed: Closed statusisEarnRewarded: Reward earned statusisLoaded: Loaded statusisOpened: Opened statusisReady: Ready statuserrorCode: Error codereward: Reward info
useAdropRewardedAd
Manages rewarded ads with a React Hook.Signature
unitId(string | null): Ad unit ID
AdropMetrics
Class for managing user attributes and events.setProperty
key(string): Property keyvalue(any): Property value
logEvent
name(string): Event nameparams(object, optional): Event parameters
properties
- Promise<Record<string, any>>: Property object
AdropProperties
Enum defining user property keys.AGE: AgeBIRTH: Birth dateGENDER: Gender
AdropGender
Enum defining gender.MALE: MaleFEMALE: FemaleOTHER: OtherUNKNOWN: Unknown