The MobileFuse SDK can be used by mediators as an SDK bidding network with a token generation/rendering flow.
We currently support Banner, Medium Rectangle, Interstitial and Rewarded ads.
Initialization
The SDK does not need to be initialized for our bidding adapter flows.
Token Generation
An SDK-generated token should be passed to the MobileFuse bidding endpoint for every bidding request. Our tokens are encoded strings and may be up to 4000 bytes in size, but are generally much smaller.
To generate a token, pass a token request object to the token provider class. Implementation differs for each platform as follows:
Android
// Optionally pass in privacy preferences MobileFusePrivacyPreferences.Builder privacyBuilder = new MobileFusePrivacyPreferences.Builder(); privacyBuilder.setUsPrivacyConsentString(mediationPlatform.usPrivacyString); privacyBuilder.setIabConsentString(mediationPlatform.iabConsentString); privacyBuilder.setSubjectToCoppa(mediationPlatform.isAgeRestrictedUser); // Determine test mode boolean isTestModeEnabled = mediationPlatform.isTestModeEnabled; // Create our token request MobileFuseBiddingTokenRequest tokenRequest = MobileFuseBiddingTokenRequest( privacyBuilder.build(), isTesting ); // Generate a token: MobileFuseBiddingTokenProvider.getToken( tokenRequest, activity, new TokenGeneratorListener() { @Override public void onTokenGenerated(String token) { callback.onTokenCollected(token); } @Override public void onTokenGenerationFailed(String error) { callback.onTokenCollectionFailed(error); } } );
iOS
// Optionally pass in privacy preferences MobileFusePrivacyPreferences *privacyPrefs = [[MobileFusePrivacyPreferences alloc] init]; [privacyPrefs setUsPrivacyConsentString: mediationPlatform.usPrivacyString]; [privacyPrefs setIabConsentString: mediationPlatform.iabConsentString]; [privacyPrefs setSubjectToCoppa: mediationPlatform.isAgeRestrictedUser]; // Determine test mode BOOL isTesting = mediationPlatform.isTestModeEnabled; // Create our token request MFBiddingTokenRequest* request = [[MFBiddingTokenRequest alloc] init]; request.privacyPreferences = privacyPrefs; request.isTestMode = isTesting; // Generate a token: NSString* token = [MFBiddingTokenProvider getTokenWithRequest: request]; [delegate didCollectSignal: token];
The returned token is a base-64 encoded string, for example:
"H4sIAAAAAAAAAGWOTQrCMBBG7zLrsVhDVXoHTyBdpE0qgfyRxFAJubuTulJXA+/NfN8UUMbDeC8gVPSavwy3/CEDjGDWDfAHRxnyLvuOdcdDWAZambm1DRbgXlEWwwHPeJkqQlZCun+D4INLbnE6Ej0RZY3jdaqV5DN+4uSW2nBGCW+p9OZmpeVKmlp3mr9eqdSYZKSjvr4BZcS0rdkAAAA="
The mediation platform does not need to do any validation on the token, just pass the value on to MobileFuse in the appropriate OpenRTB field.
Bidding
// todo
Rendering an ad from a response token
The MobileFuse Exchange (MFX) will return a tokenized signaldata field that can be used to complete the entire lifecycle of ad creation and display.
You can pass this token into an alternative loadAd
method that allows loading directly from the token.
Android
myAdInstance.loadAdFromBiddingToken(bidResponse.signaldata);
iOS
[myAdInstance loadAdWithBiddingResponseToken: bidResponse.signaldata];