Assign an Ad Schedule to a Playlist Item

To setup an ad schedule for an individual playlist item, create an AdBreak object with a specific offset and assign a list of the ad breaks to the media. Note: the FwAdvertising object must be created and the FreeWheel settings configuration provided there.

Code Example:

// Create your FreeWheel advertising settings
int networkId = 42015;
String serverId = "";
String profileId = "fw_tutorial_android";
String sectionId = "fw_tutorial_android";
String mediaId = "fw_simple_tutorial_asset";
FwSettings settings = new FwSettings(networkId, serverId, profileId, sectionId, mediaId); 

// Create advertising object
FwAdvertising advertising = new FwAdvertising(settings);

// Construct a new AdBreak with a specific offset
// This AdBreak will play a midroll at 10%
AdBreak adBreak = new AdBreak("10%", AdSource.FW, "placeholder_string");

// Add the AdBreak to a List
List<AdBreak> schedule = new ArrayList<>();

// Build a PlaylistItem and assign the schedule
PlaylistItem video = new PlaylistItem.Builder()

// Add the PlaylistItem to a List 
List<PlaylistItem> playlist = new ArrayList<>();

// Build the PlayerConfig
PlayerConfig playerConfig = new PlayerConfig.Builder()

// Setup the player

Custom Parameters

Use the setCustomParams method of the FwSettings object to customize your FreeWheel ad request.

Code Example:

FwSettings settings = new FwSettings(networkId, serverId, profileId, sectionId, mediaId);

// Create custom parameters
Map<String, String> parameters = new HashMap<>();
parameters.put("key1", "value1");
parameters.put("key2", "value2");



No additional setup required to use VPAID. FreeWheel configuration for VPAID and VAST are the same. However, the FreeWheel campaign should be configured to use VPAID.

Unsupported Features


Post-rolls are not supported at this time but is planned as a future addition.