Step 2: Recipe Configuration Overview
After you load the media feed, you need to configure two recipes that Fire App Builder will use to pull the media categories and content from your feed. "Recipes" are JSON files that contain settings (in the form of keys and values) that Fire App Builder uses when building your app. The two recipes you must configure are as follows:
- Categories Recipe: Provides different containers to group your media. Due to the complexity of some of the parameters, the instructions are broken out into additional topics:
- Contents Recipe: Maps the properties from your media feed, such as the titles, descriptions, video URLs, and images, to Fire App Builder's content model. Due to the complexity of some of the parameters, the instructions are broken out into additional topics:
If you look at the Home screen with the default Lightcast feed, you'll see that the media is organized in different rows. In the screenshot below, you can see that media is grouped under different categories, including "Jamaican Attractions" and "The Country Jamaica."
Since every media feed usually has a different structure (for example, your feed might use the term "channels" instead of "categories," "img" instead of "image," and so on, as well as different hierarchies and structures) you will need to write some query syntax to target the categories and content in your feed.
After you query for the categories and content from your query, you then apply a selector to get the category or content text from the results. This selector, called
matchList, doesn't use Jayway JsonPath or XPath expressions but rather is custom Fire App Builder syntax.
Customize the Recipe Files
By default, Fire App Builder's sample application files in app > assets > recipes say "LightCast." The essential files for a basic configuration are these three:
Customize these files names for your specific project by duplicating these files (Android Studio lets you copy and paste files in the navigation tree to duplicate them), and then giving the duplicates new names. If your project were named "acmemedia, you might customize these file names as follows:"
To copy a file in Android Studio, either just normal copy and paste commands (Cmd + C and Cmd + V), or right-click the file and select Refactor > Copy.
Note that Fire App Builder comes with some extra files used for demonstration purposes. You can ignore these extra files.
For example configurations of common feeds (such as feeds conforming to iTunes or Roku specifications), see the following:
See Set Up the Categories Recipe to start identifying categories in your feed. Fire App Builder will group your media based on these categories.
Last updated: Apr 06, 2017