Menu

Callback information

1. Advertising event callback

The callbackInfo content description of the callback for advertising listening events: one, two, three

VariableTypeDescription
network_firm_idintGet the ID corresponding to the advertising platform, used to distinguish the advertising platform
adsource_idstringGet ad source ID. You can query specific Network information through the advertising source ID in the developer backend or TopOn Open API
adsource_index intGet the current advertising source in Sorting in WaterFall(starting from 0)
adsource_pricedounbleGet ECPM, the unit can pass getCurrency() Get
adsource_isheaderbiddingintWhether it is the advertising source for header bidding, 1: Yes, 2: No
idstringGet the unique ID generated each time an ad is displayed
publisher_revenuedoubleGet impression revenue
currencystringGet the currency unit, for example: "USD"
countrystringGet the country code, for example: "CN"
adunit_idstringGet TopOn ad slot ID
adunit_formatstringGet the ad type, including:"Native"、"RewardedVideo"、"Banner""Interstitial"、"Splash"
precisionstringGet ECPM Accuracy
"publisher_defined": eCPM defined by the developer for the advertising source in the TopOn backend (eCPM for interactive promotion also belongs to this type)
" estimated": TopOn's estimated eCPM (auto eCPM)
"exact": Header Bidding real-time bidding eCPM (except Meta advertising platform)
"ecpm_api ": Effective for Meta advertising sources, historical eCPM API estimated based on Meta's ReportAPI data.
TopOn SDK v5.9.60 and above are supported.
network_typestringGet Network type"Network": Third-party advertising platform
"Cross_Promotion":Cross promotion

"Adx":TopOn Adx
network_placement_idstringGet the Network's advertising slot ID
ecpm_levelintGet the eCPM level of the advertising source. The default value of the header bidding advertising source is 0
segment_idint Get the traffic group ID
scenario_idstringGet advertising scene ID
scenario_reward_namestringGet the incentive name of the advertising scene, only supported by Rewarded Video
scenario_reward_number intGet the incentive number of the advertising scene, only supported by Rewarded Video
sub_channelstringGet sub-channel information
channelstringGet channel information
custom_rule Dictionary<string,object> Get the Json string of the custom rule of Placement+App dimension


2. NETWORK FIRM ID

TopOn platform The NETWORK FIRM ID corresponds to the Network name

Network NameNETWORK FIRM ID
Facebook1
Admob2
Inmobi3
Flurry4
Applovin5
Mintegral6
Mopub7
Tencent AD(GDT)8
Chartboost9
Tapjoy10
Ironsource11
UnityAds12
Vungle13
Adcolony 14
TT (CSJ)15
Wanzhuanhulian16
Oneway17
Kingsoft Cloud19
Appnext21
Baidu22
Nend23
Maio24
StartApp25
Kuaishou28
Sigmob29
MyTarget32
Yandex34
Cross promotion ( MyOffer)35
Ogury36
Fyber37
Helium40
Kidoz45
A4G48
Pangle50
You Keying (Klevin)51
PubNative58
Bigo59
TopOn ADX66
JD mediation72


3. Android Download event callback

Note: Currently only valid for Android TT(CSJ)

ATDownloadResponse attribute introduction:

DownloadStatus: download status

placementID: placementID

extraMap: callback information (refer to the document Advertising Events Callback content description)

totalBytes: total file size (unit: bytes)

currBytes: currently downloaded size (unit: bytes)

fileName : File name

appName: The application name corresponding to the file

downLoadListen() {
    ATListenerManager.downloadEventHandler.listen((value) {
      switch (value.downloadStatus) {
         // Start downloading
        case DownloadStatus.downloadStart:
          print("flutter downloadStart ---- placementID: ${value.placementID}, totalBytes: ${value.totalBytes}, currBytes: ${value.currBytes}, "
              "fileName: ${value.fileName}, appName: ${value.appName}, extra: ${value.extraMap}");
          break;
        // Download progress updates
        case DownloadStatus.downloadUpdate:
          print("flutter downloadUpdate ---- placementID: ${value.placementID}, totalBytes: ${value.totalBytes}, currBytes: ${value.currBytes}, "
              "fileName: ${value.fileName}, appName: ${value.appName}, extra: ${value.extraMap}");
          break;
        // Pause download
        case DownloadStatus.downloadPause:
          print("flutter downloadPause ---- placementID: ${value.placementID}, totalBytes: ${value.totalBytes}, currBytes: ${value.currBytes}, "
              "fileName: ${value.fileName}, appName: ${value.appName}, extra: ${value.extraMap}");
          break;
        // Download complete
        case DownloadStatus.downloadFinished:
          print("flutter downloadFinished ---- placementID: ${value.placementID}, totalBytes: ${value.totalBytes}, "
              "fileName: ${value.fileName}, appName: ${value.appName}, extra: ${value.extraMap}");
          break;
        // Download failure  
        case DownloadStatus.downloadFailed:
          print("flutter downloadFailed ---- placementID: ${value.placementID}, totalBytes: ${value.totalBytes}, currBytes: ${value.currBytes}, "
              "fileName: ${value.fileName}, appName: ${value.appName}, extra: ${value.extraMap}");
          break;
        // The Apk installation is complete  
        case DownloadStatus.downloadInstalled:
          print("flutter downloadInstalled ---- placementID: ${value.placementID}, "
              "fileName: ${value.fileName}, appName: ${value.appName}, extra: ${value.extraMap}");
          break;
        case DownloadStatus.downloadUnknown:
          print("flutter downloadUnknow");
          break;
      }
    });
  }


Previous
native ads
Next
FAQ and error codes
Last modified: 2025-05-30Powered by