自 2025 年 3 月 27 日起,我們建議您使用 android-latest-release
而非 aosp-main
建構及貢獻 AOSP。詳情請參閱「Android 開放原始碼計畫變更」。
Android 中的互動
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
本頁說明 Android 如何處理從鍵盤、感應器等來源接收的各種輸入內容。
觸覺回饋
Android 觸覺回饋子系統是指透過觸覺感官刺激產生效果的硬體和軟體功能。本節提供 Android 觸覺回饋 API 最佳使用方式的指導方針和遵循說明。
Android 輸入子系統名義上包含一個事件管道,可遍歷系統的多個層級。在最底層,實體輸入裝置會產生信號,說明按鍵和觸控接觸點等狀態變更。
Neural Networks API
Android Neural Networks API (NNAPI) 會執行計算密集型作業,以便進行機器學習。本文概略說明如何為 Android 9 實作神經網路 API 驅動程式。
周邊裝置和配件
您可以使用一系列標準通訊協定,實作可擴充 Android 裝置功能的周邊裝置和其他配件,以便在各種 Android 裝置上使用。
感應器
Android 感應器可讓應用程式存取行動裝置的基礎實體感應器。這些是資料提供虛擬裝置,由 sensors.h
(感應器硬體抽象層 (HAL)) 定義。
情境感知中樞執行階段環境
Context Hub 執行階段環境 (CHRE) 提供通用平台,可在低功耗處理器上執行系統層級應用程式,並提供簡單、標準化且易於嵌入的 API。有了 CHRE,裝置原始設備製造商 (OEM) 就能輕鬆從應用程式處理器卸載處理作業,進而節省電池電量並改善各方面的使用者體驗,並啟用一類隨時運作且具備情境感知功能的功能。
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-07-27 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-27 (世界標準時間)。"],[],[],null,["# Interaction in Android\n\nThis page explains how Android processes the various inputs it receives from\nthe keyboard, sensors, and more.\n\nHaptics\n-------\n\nThe Android haptics subsystem refers to hardware and software features that\ncontribute to the creation of stimuli through the sense of touch. This section\nprovides guidance and compliance instructions on the best use of Android haptics\nAPIs.\n\nInput\n-----\n\nThe Android input subsystem nominally consists of an event pipeline that\ntraverses multiple layers of the system. At the lowest layer, the physical input\ndevice produces signals that describe state changes such as key presses and\ntouch contact points.\n\nNeural Networks API\n-------------------\n\nThe Android Neural Networks API (NNAPI) runs computationally intensive\noperations for machine learning. This document provides an overview on how to\nimplement a Neural Networks API driver for Android 9.\n\nPeripherals and accessories\n---------------------------\n\nUsing a suite of standard protocols, you can implement compelling peripherals\nand other accessories that extend Android capabilities in a wide range of\nAndroid-powered devices.\n\nSensors\n-------\n\nAndroid sensors give apps access to a mobile device's underlying\nphysical sensors. They are data-providing virtual devices defined by\n`sensors.h`, the sensor Hardware Abstraction Layer (HAL).\n\nContext Hub Runtime Environment\n-------------------------------\n\nContext Hub Runtime Environment (CHRE) provides a common platform for running\nsystem-level apps on a low-power processor, with a simple, standardized,\nembedded-friendly API. CHRE makes it easy for device OEMs to offload processing\nfrom the applications processor, to save battery and improve various areas of\nthe user experience, and enable a class of always-on, contextually aware\nfeatures."]]