Customize the Fire App Builder Sample Project
The first step in creating your app is to customize the "Application" folder. The Application folder contains the sample app created with Fire App Builder.
Customize the Application
-
Expand the Project pane (but not the Project view) in the upper-left corner to view the files. Make sure you're in the Android View. Unless noted, this documentation always refers to file locations using the Android View.
-
In the folders in the Project pane, expand app and then go to res > values > custom.xml. In the
app_name
string, type the name of your app. For example:<string translatable="false" name="app_name">Write the Docs Podcast</string>
The AndroidManifest.xml file (inside app > manifests) reads the name of the app from the string you edited. (In Android Manifest, the code referencing the string is
android:label="@string/app_name"
. Fire App Builder uses this reference style to extract your customized code into XML files so that you don't have to edit Java.) The references don't need to point to a specific XML file because Android Studio looks in all XML files for the references. Any string in the app's custom.xml file overwrites strings in the other XML files.The
app_name
andapp_name_short
strings have atranslatable="false"
property. The name of your app is not translated.In the res > values > strings folder, there are multiple strings.xml files to support different locales for your app. For example, if someone from a German locale opens your app, the app uses the "strings.xml (de)" file. If someone from Japan opens your app, the app uses the "strings.xml (ja)" file, and so on. If there is no language specific string, the app falls back on strings.xml.
-
In the
app_name_short
string, add an abbreviated name for your app that is no longer than 15 characters. (If your app's name is already 15 characters or less, just use the same app name.)<string translatable="false" name="app_name_short">WTD Podcast</string>
Recommendations, which is an optional feature, uses the abbreviated app name. The recommendations space on the Fire TV home screen doesn't allow your app name to be longer than 15 characters.
-
Open your app's AndroidManifest.xml file (located in app > manifests) and update the
package
name,com.fireappbuilder.android.calypso
, to one that reflects your app's new name. For example, for an app named "acmemedia," you might change it to the following:<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.fireappbuilder.android.acmemedia">
Warning: The package name for apps you submit to the HAQM Appstore must be unique and must not contain the stringamazon
. Usingamazon
in your package name creates conflicts when integrating with the HAQM Catalog. Additionally, your app's package name must remain the same through the life of your app. If you change the package name, the app doesn't retain any history or association with previously submitted apps. As per requirements with Android package names, the package name must start with letters.The sample app in Fire App Builder doesn't have any classes in the
com.fireappbuilder.android.acmemedia
package. You can add custom classes to overwrite existing Fire App Builder functionality or add to it. -
In the Android View, expand the Gradle Scripts folder and open the build.gradle (Module: app) file. Update the
applicationId
property to match your package name. For example:defaultConfig { applicationId "com.fireappbuilder.android.acmemedia" minSdkVersion 21 targetSdkVersion 23 versionCode 10 versionName "1.0.7" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" multiDexEnabled true }
Note: Unless otherwise noted, this documentation uses the Android view to describe paths to files.Here's an example:
-
In this same build.gradle (Module: app) file, note the
versionCode
andversionName
. You can leave these values as is. However, if you submit an update to your app, you must increment the versions. Here's the difference between these two codes:-
The
versionCode
(an integer) is an internal numbering scheme for your app's version. Each APK you upload to the Appstore must have a uniquely incrementedversionCode
. The initialversionCode
can be any number, but when you submit an update to your APK, you must increment theversionCode
. See android:versionCode in the Android documentation for more details. -
The
versionName
(a string) is the version that users see. It doesn't have to match theversionCode
and can be anything. See android:versionName in the Android documentation for more details.
You do not need the
versionCode
andversionName
elements in your app's manifest. When you upload your APK into the HAQM Appstore, the Appstore reads the information from both the "build.gradle (Module: app)" file instead of the AndroidManifest.xml. -
-
Expand the Gradle Scripts folder and open the gradle.properties (Project Properties) file. Customize the
applicationName
to your app's name without using spaces. Android Studio uses this name in the APK filename (which you generate later when you create a signed APK to submit your app into the Appstore). -
When you make changes to Gradle files, you're prompted to synchronize Gradle with your project. Click the Sync Now link in the upper-right corner.
Clean and Build the Project
- Go to Build > Rebuild Project. Rebuild Project cleans up any artifacts from the previous app and then rebuild your project. It can take a few minutes for this process to finish.
- Build your new app by clicking the Run 'app' button
.
If the app fails to build or install on your Fire TV, try running Build > Rebuild Project again. Also note that you can't have two apps with the same package name on Fire TV. For example, if you updated your package name to com.acme.media
, but another app on your Fire TV already has this package name (perhaps the official app you've already published in the Appstore?), you must uninstall the other app first (by going to Settings > Applications > Manage Installed Applications on your Fire TV) before you can sideload (through ADB) the app you're developing.
Next Steps
Now that you've built and customized the default app in Fire App Builder, it's time to load and configure your media feed. Go to Load Your Media Feed. This next series of steps follows II: Configure Your Feed map.
Last updated: Apr 01, 2025