Fire OS概览
Fire OS概览
Fire OS是亚马逊Fire TV和平板电脑上运行的操作系统。Fire OS是Android的一个分支,因此若应用在Android上运行,很可能也能在亚马逊的Fire设备上运行。作为开发者,可能无需调整Android代码,即可在亚马逊的操作系统上发布应用。
Fire OS版本
Fire OS有多个版本:
下表显示Fire TV设备运行的操作系统版本。
注意: 来自同一制造商的设备可能共享相同的构建型号。
有关更多规格信息,请参阅Fire TV设备规格。
大部分Fire设备通过空中下载技术接收更新,自动获取Fire OS更新。并非每个Fire设备均同时收到同一Fire OS版本的推送。通常在不同的时间向不同的设备推出更新。
可通过转至设置>设备 >Fire TV和查看“软件版本”详细信息,查看Fire OS版本。有关Fire OS版本的更多信息,请参阅Fire TV最终用户文档中的亚马逊Fire TV设备软件更新。
默认情况下会禁用调试和详细日志记录
在我们最新的软件版本中,默认情况下会禁用调试和详细日志记录。这样设置是为了优化我们的设备和后端存储服务,以确保为我们的客户提供出色的设备体验。对于开发或QA,您可以使用以下命令来纳入调试和详细日志。
启用调试和详细日志记录的步骤
通过以下ADB命令重置相关系统属性。
adb shell setprop persist.log.tag V/D/I/W/E
(注意:对于Fire OS 5,这将是“adb shell setprop persist.log.level 2/3/4/5/6”,还需要“adb reboot”来反映更改)
然后要收集日志,执行以下命令:
重要须知: 该属性将在重新启动后持续存在。
- 如果您希望打印应用调试日志,请通过现有的Android API,使用应用的标记名称设置属性
log.tag.<tag>来覆盖其日志标记的属性。
- 例如,您可以通过设置属性
log.tag.ActivityManager=D覆盖特定于标记的日志。Logd理解这点,并使用上述TAG打印所有调试日志。
服务差异
在核心上,Fire OS和Android具有相同的基础。Fire OS与Android的主要差别在于服务。Fire OS可能使用亚马逊的服务,而不是使用Google的服务(用于浏览、定位、消息传递、付款等活动)。最明显的是,亚马逊使用亚马逊应用商店发布应用,而Google使用Google Play Store(仅提供英文版)。
如果您的Android应用连接到Google服务,则将其移植到Fire OS可能需要利用亚马逊服务。
构建应用时,请按照标准Android文档所述进行操作。需要考虑亚马逊Fire OS的一些差异时,本网站的文档中会注明这些差异。
目标是尽可能提供与Android对等的功能(不包括Google的服务),这样您就不必学习另一种开发技术,也不必对现有的Android应用进行更改。
下表将Google的服务与亚马逊的类似服务进行了对比。
Last updated: 2026年3月9日
").insertBefore(this);
}
});
});
$(document).ready(function() {
if ($("#jumpoffset").length) {
var scrollhash = document.getElementById('jumpoffset');
scrollhash.scrollIntoView(true);
if (location.hash) {
location.href = location.hash;
} else {
var scrollbody = document.querySelector('.mainColumn');
scrollbody.scrollIntoView(true);
window.scroll(0, -500);
}
}
});
$(document).ready(function() {
if ($("#jump").length) {
var scrollold = document.getElementById('jump');
scrollold.scrollIntoView(true);
window.scroll(0, -100);
if (location.hash) {
location.href = location.hash;
}
}
});
//resize container on local builds
$(document).ready(function() {
if (window.location.href.indexOf("/127.0.0.1:4000/") > -1) {
document.querySelector('.container-fluid').style.position = 'fixed';
}
});
//add underline to headers
$(document).ready(function() {
if ($(".productTitle").is(':contains("Alexa Skills Kit")')) {
$(".dppnItem a").each(function() {
if ($(this).is(':contains("Alexa Skills Kit")')) {
$(this).css("border-bottom", "1.3px solid #FFFFFF");
}
});
}
if ($(".productTitle").is(':contains("Alexa Presentation Language (APL)")')) {
$(".dppnItem a").each(function() {
if ($(this).is(':contains("Alexa Skills Kit")')) {
$(this).css("border-bottom", "1.3px solid #FFFFFF");
}
});
}
if ($(".productTitle").is(':contains("Alexa Connect Kit")')) {
$(".dppnItem a").each(function() {
if ($(this).is(':contains("Alexa Connect Kit")')) {
$(this).css("border-bottom", "1.3px solid #FFFFFF");
}
});
}
if ($(".productTitle").is(':contains("A/B Testing")')) {
$(".dppnItem a").each(function() {
if ($(this).is(':contains("Alexa Skills Kit")')) {
$(this).css("border-bottom", "1.3px solid #FFFFFF");
}
});
}
if ($(".productTitle").is(':contains("Alexa Smart Properties")')) {
$(".dppnItem a").each(function() {
if ($(this).is(':contains("Alexa Smart Properties")')) {
$(this).css("border-bottom", "1.3px solid #FFFFFF");
}
});
}
if ($(".productTitle").is(':contains("Alexa Conversations Developer Guide")')) {
$(".dppnItem a").each(function() {
if ($(this).is(':contains("Alexa Skills Kit")')) {
$(this).css("border-bottom", "1.3px solid #FFFFFF");
}
});
}
if ($(".productTitle").is(':contains("Alexa Design Guide")')) {
$(".dppnItem a").each(function() {
if ($(this).is(':contains("Alexa Design Guide")')) {
$(this).css("border-bottom", "1.3px solid #FFFFFF");
}
});
$(".dppnItem a").each(function() {
if ($(this).is(':contains("Alexa Design Guide")')) {
$(this).css("padding", "0");
}
});
}
if ($(".productTitle").is(':contains("Alexa Gadgets Toolkit")')) {
$(".dppnItem a").each(function() {
if ($(this).is(':contains("Alexa Gadgets Toolkit")')) {
$(this).css("border-bottom", "1.3px solid #FFFFFF");
}
});
$(".dppnItem a").each(function() {
if ($(this).is(':contains("Alexa Gadgets Toolkit")')) {
$(this).css("padding", "0");
}
});
}
if ($(".productTitle").is(':contains("Alexa Voice Service")')) {
$(".dppnItem a").each(function() {
if ($(this).is(':contains("Alexa Voice Service")')) {
$(this).css("border-bottom", "1.3px solid #FFFFFF");
}
});
}
if ($("h1").is(':contains("Alexa Reference Content")')) {
$(".dppnItem a").each(function() {
if ($(this).is(':contains("Reference")')) {
$(this).css("border-bottom", "1.3px solid #FFFFFF");
}
});
}
if ($("h1").is(':contains("Alexa Videos")')) {
$(".dppnItem a").each(function() {
if ($(this).is(':contains("Videos")')) {
$(this).css("border-bottom", "1.3px solid #FFFFFF");
}
});
}
if ($("h1").is(':contains("Alexa Code Samples")')) {
$(".dppnItem a").each(function() {
if ($(this).is(':contains("Code Samples")')) {
$(this).css("border-bottom", "1.3px solid #FFFFFF");
}
});
}
if ($("h1").is(':contains("Documentation Home")')) {
$(".dppnItem a").each(function() {
if ($(this).is(':contains("Home")')) {
$(this).css("border-bottom", "1.3px solid #FFFFFF");
}
});
}
});
$(document).ready(function () {
const myScrollspy = $("#myScrollspy");
if (myScrollspy.length) {
const containsList2orList3 = myScrollspy.find(".list2, .list3").length > 0;
if (containsList2orList3) {
myScrollspy.css("display", "block");
$(".fa.fa-info-circle").show();
} else {
myScrollspy.css("display", "none");
$(".fa.fa-info-circle").hide();
}
}
});
/**
* This function moves the 'page-not-translated' section from its original position
* to a new position after the 'atd-categories-header' and ensures it is displayed
* only in the new location. This is achieved by hiding the section initially,
* moving it, and then displaying it again once it is in the correct position.
*/
$(document).ready(function() {
const $pageNotTranslatedMessage = $('#page-not-translated');
const $desktopCategoriesHeader = $('.navigation-header.atd-categories-header');
const $mobileToggleHeader = $('.mobile-toggle');
if ($pageNotTranslatedMessage.length) {
if ($mobileToggleHeader.length) {
$pageNotTranslatedMessage.insertAfter($mobileToggleHeader);
} else if ($desktopCategoriesHeader.length) {
$pageNotTranslatedMessage.insertAfter($desktopCategoriesHeader);
}
$pageNotTranslatedMessage.show();
}
});
// Function to handle smooth scrolling to target elements when links are clicked
$(document).ready(function () {
$('.customspy a, .mainColumn a').on('click', function (event) {
const targetId = $(this).attr('href');
if (targetId && targetId.startsWith('#')) {
event.preventDefault();
const targetElement = document.querySelector(`[id="${targetId.replace('#', '')}"]`);
if (targetElement) {
const hash = targetId.substring(1);
window.history.pushState(null, '', `#${hash}`);
targetElement.scrollIntoView(true);
window.scroll(0, -500);
}
}
});
});
window.addEventListener('DOMContentLoaded', function () {
const targetId = window.location.hash;
if (targetId) {
const targetElement = document.querySelector(targetId);
if (targetElement) {
setTimeout(() => {
targetElement.scrollIntoView(true);
window.scrollBy(0, -500);
}, 10);
}
}
});
function activateContentBasedOnHash() {
const currentHash = window.location.hash.substring(1);
if (currentHash) {
const contentElement = document.getElementById(currentHash);
if (contentElement) {
activateTabAndContent(contentElement);
}
}
}
function activateTabAndContent(contentElement) {
const tabSection = contentElement.closest('.tab-pane');
if (tabSection) {
const parentTabLink = document.querySelector(`a[href='#${tabSection.id}']`);
if (parentTabLink) {
const parentNavTabs = parentTabLink.closest('.nav-tabs');
if (parentNavTabs) {
parentNavTabs.querySelectorAll('.nav-link').forEach(link => {
link.classList.remove('active', 'show');
});
parentTabLink.classList.add('active', 'show');
}
const parentTabContent = tabSection.closest('.tab-content');
if (parentTabContent) {
parentTabContent.querySelectorAll('.tab-pane').forEach(tab => {
tab.classList.remove('active', 'show');
});
tabSection.classList.add('active', 'show');
}
}
}
}
function scrollToHashWithOffset() {
const tabHash = window.location.hash;
const targetTabLink = document.querySelector(`.nav-tabs a[href="${tabHash}"]`);
const mainContentColumn = document.querySelector('.inline');
if (targetTabLink && mainContentColumn) {
const totalHeaderHeight = getTotalHeaderHeight() + 40;
targetTabLink.scrollIntoView({behavior: 'smooth', block: 'start'});
setTimeout(() => {
mainContentColumn.scrollBy(0, -totalHeaderHeight);
}, 20);
}
}
function getTotalHeaderHeight() {
return [...document.querySelectorAll('.atd-services-header, .atd-categories-header')]
.reduce((total, header) => total + (header ? header.offsetHeight : 0), 0);
}
function handleClick(event) {
event.preventDefault();
const link = event.currentTarget;
const hash = link.getAttribute('href').substring(1);
const contentElement = document.getElementById(hash);
if (contentElement) {
activateTabAndContent(contentElement);
scrollToHashWithOffset();
}
}
function handleBackToTopClick(event) {
event.preventDefault();
const mainContentColumn = document.querySelector('.inline');
if (mainContentColumn) {
mainContentColumn.scrollTo({top: 0, behavior: 'smooth'});
}
window.scrollTo({top: 0, behavior: 'smooth'});
}
document.addEventListener('DOMContentLoaded', () => {
activateContentBasedOnHash();
scrollToHashWithOffset();
const myScrollspy = document.getElementById('myScrollspy');
if (myScrollspy) {
myScrollspy.querySelectorAll('a[href^="#"]').forEach(link => {
link.addEventListener('click', handleClick);
});
}
document.querySelectorAll('.dpfBackToTopLink, .backToTop').forEach(link => {
link.addEventListener('click', handleBackToTopClick);
});
});
// Show tab link as selected when clicked
$(document).ready(function() {
$('.nav-tabs > li > a').on('click', function(e) {
e.preventDefault();
$(this).tab('show');
$(this).addClass('active show');
});
});
// Fix for when version dropdown is on the same page as nav tab dropdown
// closes other dropdown menu to avoid overlap/usability issues
$(document).ready(function() {
// Version selector dropdown
$('.versionsButton').click(function(e) {
// Close the nav tab dropdown if open
$('.nav-link.dropdown-toggle').siblings('.dropdown-menu').removeClass('show');
});
// Nav tab selector dropdown
$('.nav-link.dropdown-toggle').click(function(e) {
// Close the version dropdown if open
$('.versionsButton').siblings('.dropdown-menu').removeClass('show');
});
});
// Handle active state management for dropdown menu in nav-tabs
// Fixes edge case issues for when version selector dropdown and
// nav-tab dropdown appear on the same page
$(document).ready(function() {
// Function to deactivate all tab panes and reset dropdown items
function deactivateAllTabs() {
$('.position .nav-item.dropdown .dropdown-menu .dropdown-item').each(function() {
const targetId = $(this).attr('href');
$(targetId).removeClass('active show');
$(this).removeClass('active show');
});
}
// Store the original pushState function
const originalPushState = history.pushState;
// Create a custom event for pushState
const pushStateEvent = new Event('pushState');
// Override pushState
history.pushState = function() {
originalPushState.apply(this, arguments);
// Dispatch the custom event
window.dispatchEvent(pushStateEvent);
};
// Add pushState listener
window.addEventListener('pushState', function() {
const params = new URLSearchParams(window.location.search);
const vValue = params.get('v');
// Handle query parameter change from version selector
if (vValue) {
// Remove active classes from all tabs
deactivateAllTabs();
$('.position').each(function() {
var firstTabPane = $(this).find('.tab-pane').first();
if (firstTabPane.length > 0) {
var tabId = firstTabPane.attr('id');
var dropdownItem = $('.dropdown-menu .dropdown-item[href="#' + tabId + '"]');
// Make first tab in each version active
dropdownItem.addClass('active show');
firstTabPane.addClass('active show');
}
});
}
});
// Handle dropdown item clicks
$('.position .nav-item.dropdown .dropdown-menu .dropdown-item').click(function(e) {
e.preventDefault();
// Remove active classes from all tabs
deactivateAllTabs();
// Add active class to clicked item
$(this).addClass('active show');
// Show corresponding tab content
const targetId = $(this).attr('href');
$(targetId).addClass('active show');
});
// Handle initial load from URL hash
if (window.location.hash) {
const tabId = window.location.hash;
// Only manipulate tabs if the hash matches a dropdown item (i.e., it's a tab ID)
const matchingDropdownItem = $(`.position .nav-item.dropdown .dropdown-menu .dropdown-item[href="${tabId}"]`);
if (matchingDropdownItem.length) {
// Deactivate all tabs first
deactivateAllTabs();
// Activate the correct tab and content
matchingDropdownItem.addClass('active show');
$(tabId).addClass('active show');
}
}
});
// Remove show class from caption elements to preserve table-caption display
// (fixes issue where the show class, which forces the display style to block,
// caused the table caption to appear inside the table, rather than above it)
$(document).ready(function() {
if (window.location.hash) {
const anchorId = window.location.hash.substring(1);
const targetElement = document.getElementById(anchorId);
if (targetElement) {
const captionParent = $(targetElement).closest('caption');
if (captionParent.length) {
captionParent.removeClass('show');
}
}
}
});