Settings for Adfox
Adfox allows the application owner to directly negotiate with advertisers about ad placement using the same Mobile Ads SDK as for standard monetization through an open auction. More in this article.
Adfox supports multiple ad types:
- Adaptive inline banner
- Adaptive sticky banner
- Interstitial advertising
Adaptive inline banner
Follow the instructions to enable an embedded adaptive banner. In addition, use the AdRequest
object to transmit the code received in the Adfox interface (for more information, see Adfox Help).
...
// Code from the Adfox interface for working with direct campaigns.
private Dictionary<string, string> CreateAdfoxParameters()
{
Dictionary<string, string> parameters = new Dictionary<string, string>()
{
{"adf_ownerid", "<example>"},
{"adf_p1", "<example>"},
{"adf_p2", "<example>"},
{"adf_pt", "<example>"},
...
};
return parameters;
}
...
private void RequestBanner()
{
...
AdRequest request = new AdRequest.Builder()
.WithParameters(CreateAdfoxParameters())
.Build();
banner.LoadAd(request);
...
}
Adaptive sticky banner
To enable an adaptive sticky banner, follow the instructions. In addition, use the AdRequest
object to transmit the code received in the Adfox interface (for more information, see Adfox Help).
...
// Code from the Adfox interface for working with direct campaigns.
private Dictionary<string, string> CreateAdfoxParameters()
{
Dictionary<string, string> parameters = new Dictionary<string, string>()
{
{"adf_ownerid", "<example>"},
{"adf_p1", "<example>"},
{"adf_p2", "<example>"},
{"adf_pt", "<example>"},
...
};
return parameters;
}
...
private void RequestBanner()
{
...
AdRequest request = new AdRequest.Builder()
.WithParameters(CreateAdfoxParameters())
.Build();
banner.LoadAd(request);
...
}
Interstitial advertising
To enable an interstitial ad, follow the instructions. In addition, use the AdRequest
object to transmit the code received in the Adfox interface (for more information, see Adfox Help).
...
// Code from the Adfox interface for working with direct campaigns.
private Dictionary<string, string> CreateAdfoxParameters()
{
Dictionary<string, string> parameters = new Dictionary<string, string>()
{
{"adf_ownerid", "<example>"},
{"adf_p1", "<example>"},
{"adf_p2", "<example>"},
{"adf_pt", "<example>"},
...
};
return parameters;
}
...
private void RequestInterstitial()
{
...
AdRequest request = new AdRequest.Builder()
.WithParameters(CreateAdfoxParameters())
.Build();
interstitial.LoadAd(request);
...
}