Android 5.0 互換性定義

リビジョン 1
最終更新日: 2015 年 1 月 12 日

著作権 © 2015、Google Inc. 無断複写・転載を禁じます。
互換性@android.com

目次

1. はじめに

2. デバイスの種類

2.1 デバイス構成

3. ソフトウェア

3.1.マネージド API の互換性

3.2.ソフト API の互換性

3.2.1.権限

3.2.2.ビルドパラメータ

3.2.3.インテントの互換性

3.2.3.1.コアアプリケーションの意図

3.2.3.2.インテントのオーバーライド

3.2.3.3.インテントの名前空間

3.2.3.4.ブロードキャストインテント

3.2.3.5.デフォルトのアプリ設定

3.3.ネイティブ API の互換性

3.3.1 アプリケーションバイナリインターフェイス

3.4.ウェブ互換性

3.4.1. WebView の互換性

3.4.2.ブラウザの互換性

3.5. API の動作の互換性

3.6. API 名前空間

3.7.ランタイム互換性

3.8.ユーザーインターフェイスの互換性

3.8.1.ランチャー(ホーム画面)

3.8.2.ウィジェット

3.8.3.通知

3.8.4.検索

3.8.5.乾杯

3.8.6.テーマ

3.8.7.ライブ壁紙

3.8.8.アクティビティの切り替え

3.8.9.入力管理

3.8.10。ロック画面メディアコントロール

3.8.11。夢

3.8.12。位置

3.8.13。 Unicode とフォント

3.9.デバイス管理

3.10.アクセシビリティ

3.11。テキスト読み上げ

3.12. TV 入力フレームワーク

4. アプリケーションパッケージの互換性

5. マルチメディア互換性

5.1.メディアコーデック

5.1.1.オーディオコーデック

5.1.2.画像コーデック

5.1.3.ビデオコーデック

5.2.ビデオエンコーディング

5.3.ビデオのデコード

5.4.録音

5.4.1.未加工オーディオのキャプチャ

5.4.2.音声認識用のキャプチャ

5.4.3.再生の再ルーティングのためのキャプチャ

5.5.オーディオの再生

5.5.1.未加工オーディオの再生

5.5.2.オーディオエフェクト

5.5.3.音声出力音量

5.6.オーディオ遅延

5.7.ネットワークプロトコル

5.8.セキュアメディア

6. 開発者ツールとオプションの互換性

6.1.開発者ツール

6.2.開発者向けオプション

7. ハードウェアの互換性

7.1.ディスプレイとグラフィックス

7.1.1.画面構成

7.1.1.1.画面サイズ

7.1.1.2.画面のアスペクト比

7.1.1.3.画面密度

7.1.2.メトリクスの表示

7.1.3.画面の向き

7.1.4. 2D および 3D グラフィックスの高速化

7.1.5.レガシーアプリケーション互換モード

7.1.6.スクリーンテクノロジー

7.1.7.外部ディスプレイ

7.2.入力デバイス

7.2.1.キーボード

7.2.2.非タッチナビゲーション

7.2.3.ナビゲーションキー

7.2.4.タッチスクリーン入力

7.2.5.フェイクタッチ入力

7.2.6.ゲームコントローラーのサポート

7.2.6.1.ボタンのマッピング

7.2.7.リモコン

7.3.センサー

7.3.1.加速度計

7.3.2.磁力計

7.3.3. GPS

7.3.4.ジャイロスコープ

7.3.5.バロメーター

7.3.6.温度計

7.3.7.測光器

7.3.8.近接センサー

7.4.データ接続性

7.4.1.電話

7.4.2. IEEE 802.11 (Wi-Fi)

7.4.2.1. Wi-Fiダイレクト

7.4.2.2. Wi-Fi トンネル ダイレクト リンクのセットアップ

7.4.3.ブルートゥース

7.4.4.近距離無線通信

7.4.5.最小限のネットワーク能力

7.4.6.同期設定

7.5。カメラ

7.5.1.背面カメラ

7.5.2.前面カメラ

7.5.3.外部カメラ

7.5.4.カメラ API の動作

7.5.5.カメラの向き

7.6.メモリとストレージ

7.6.1.最小限のメモリとストレージ

7.6.2.アプリケーション共有ストレージ

7.7. USB

7.8.オーディオ

7.8.1.マイクロフォン

7.8.2.オーディオ出力

7.8.2.1。アナログオーディオポート

8. 性能の互換性

8.1.ユーザーエクスペリエンスの一貫性

8.2.メモリパフォーマンス

9. セキュリティモデルの互換性

9.1.権限

9.2. UID とプロセスの分離

9.3.ファイルシステムのアクセス許可

9.4.代替実行環境

9.5。マルチユーザーのサポート

9.6.プレミアムSMSの警告

9.7.カーネルのセキュリティ機能

9.8。プライバシー

9.9。フルディスク暗号化

9.10。検証済みブート

10. ソフトウェア互換性テスト

10.1.互換性テストスイート

10.2. CTS 検証者

11. 更新可能なソフトウェア

12. 文書変更履歴

13. お問い合わせ

14. リソース

1. はじめに

このドキュメントでは、デバイスが Android 5.0 と互換性を持つために満たす必要がある要件を列挙します。

「MUST」、「MUST NOT」、「REQUIRED」、「SHALL」、「SHALL NOT」、「SHOULD」、「SHOULD NOT」、「RECOMMENDED」、「MAY」、および「OPTIONAL」の使用は、IETF 標準に従っています。 RFC2119 [参考文献、1 ] で定義されています。

このドキュメントで使用される「デバイス実装者」または「実装者」とは、Android 5.0 を実行するハードウェア/ソフトウェア ソリューションを開発する個人または組織を指します。 「デバイス実装」または「実装」は、そのように開発されたハードウェア/ソフトウェア ソリューションです。

Android 5.0 と互換性があるとみなされるには、デバイス実装は、参照によって組み込まれたドキュメントを含め、この互換性定義に示されている要件を満たさなければなりません。

この定義またはセクション 10で説明されているソフトウェア テストが沈黙、曖昧、または不完全である場合、既存の実装との互換性を確保するのはデバイス実装者の責任です。

このため、Android オープンソース プロジェクト [参考文献、2 ] は、Android のリファレンスであり、推奨される実装でもあります。デバイス実装者には、Android オープンソース プロジェクトから入手可能な「アップストリーム」ソース コードを可能な限り最大限に基づいて実装することが強く推奨されます。一部のコンポーネントは仮想的に代替実装に置き換えることができますが、ソフトウェア テストに合格することが大幅に困難になるため、この方法は使用しないことを強くお勧めします。互換性テスト スイートを含む、標準の Android 実装との完全な動作互換性を確保するのは実装者の責任です。最後に、特定のコンポーネントの置換や変更はこの文書で明示的に禁止されていることに注意してください。

セクション 14にリストされているリソースの多くは、Android SDK から直接的または間接的に派生しており、機能的にはその SDK のドキュメントの情報と同一です。この互換性定義または互換性テスト スイートが SDK ドキュメントと一致しない場合は、SDK ドキュメントが信頼できるものとみなされます。セクション 14に含まれる参考文献に記載されている技術的な詳細は、この互換性定義の一部として含められるものとみなされます。

2. デバイスの種類

Android オープンソース プロジェクトは、さまざまなデバイス タイプとフォーム ファクターの実装に使用されてきましたが、アーキテクチャと互換性要件の多くの側面がハンドヘルド デバイス向けに最適化されています。 Android 5.0 以降、Android オープンソース プロジェクトは、このセクションで説明するように、より多様なデバイス タイプを受け入れることを目指しています。

Android ハンドヘルド デバイスとは、 MP3 プレーヤー、電話、タブレットなど、通常手に持って使用する Android デバイス実装を指します。 Android ハンドヘルド デバイスの実装:

  • デバイスにタッチスクリーンが埋め込まれている必要があります
  • バッテリーなどの移動性を提供する電源が必要です

Android テレビ デバイスとは、約 10 フィート離れた場所に座っているユーザーがデジタル メディア、映画、ゲーム、アプリ、ライブ TV を利用するためのエンターテイメント インターフェイス (「リーン バック」または「10 フィート ユーザー インターフェイス」) である Android デバイス実装を指します。 ”)。 Android テレビ デバイス:

  • 埋め込みスクリーンがあるか、VGA、HDMI、またはディスプレイ用のワイヤレス ポートなどのビデオ出力ポートが含まれている必要があります。
  • android.software.leanback および android.hardware.type.television 機能を宣言しなければなりません [参考文献、3 ]

Android Watch デバイスとは、身体 (場合によっては手首) に装着することを目的とした Android デバイスの実装を指します。

  • 物理的な対角線の長さが 1.1 ~ 2.5 インチの範囲の画面が必要です
  • 機能 android.hardware.type.watch を宣言しなければなりません
  • uiMode = UI_MODE_TYPE_WATCH をサポートしなければなりません [リソース、4 ]

上記のデバイス タイプのいずれにも適合しないすべての Android デバイス実装は、要件が特定の Android デバイス タイプにのみ適用されると明示的に説明されている場合を除き、Android 5.0 と互換性があるためにこのドキュメントのすべての要件を満たさなければなりません。

2.1 デバイス構成

これは、デバイスの種類ごとのハードウェア構成の主な違いの概要です。 (空のセルは「MAY」を示します)。この表ではすべての構成がカバーされているわけではありません。詳細については、関連するハードウェアのセクションを参照してください。

カテゴリー

特徴

セクション

ハンドヘルド

テレビ

時計

他の

入力

十字キー

7.2.2.非タッチナビゲーション

しなければならない

タッチスクリーン

7.2.4.タッチスクリーン入力

しなければならない

しなければならない

すべき

マイクロフォン

7.8.1.マイクロフォン

しなければならない

すべき

しなければならない

すべき

センサー

加速度計

7.3.1 加速度計

すべき

すべき

すべき

GPS

7.3.3. GPS

すべき

接続性

Wi-Fi

7.4.2. IEEE 802.11

すべき

しなければならない

すべき

Wi-Fiダイレクト

7.4.2.1. Wi-Fiダイレクト

すべき

すべき

すべき

ブルートゥース

7.4.3.ブルートゥース

すべき

しなければならない

しなければならない

すべき

Bluetooth 低エネルギー

7.4.3.ブルートゥース

すべき

しなければならない

すべき

すべき

USBペリフェラル/ホストモード

7.7. USB

すべき

すべき

出力

スピーカーおよび/またはオーディオ出力ポート

7.8.2.オーディオ出力

しなければならない

しなければならない

しなければならない

3. ソフトウェア

3.1.マネージド API の互換性

マネージド Dalvik バイトコード実行環境は、Android アプリケーションの主要な手段です。 Android アプリケーション プログラミング インターフェイス (API) は、マネージド ランタイム環境で実行されるアプリケーションに公開される Android プラットフォーム インターフェイスのセットです。デバイス実装は、Android SDK [参考文献、5 ] によって公開されている文書化された API、またはアップストリームの Android ソース コード内の "@SystemApi" マーカーで装飾された API の、文書化されたすべての動作を含む完全な実装を提供しなければなりません (MUST)。

この互換性定義で特に許可されている場合を除き、デバイス実装は、マネージド API を省略したり、API インターフェイスや署名を変更したり、文書化された動作から逸脱したり、no-ops を含めたりしてはなりません。

この互換性定義では、Android に API が含まれる一部のタイプのハードウェアをデバイス実装で省略することが許可されています。このような場合でも、API は依然として存在し、適切な方法で動作する必要があります。このシナリオの具体的な要件については、セクション 7を参照してください。

3.2.ソフト API の互換性

セクション 3.1のマネージド API に加えて、Android には、インテント、権限、およびアプリケーションのコンパイル時に強制できない Android アプリケーションの同様の側面などの形式で、ランタイム専用の重要な「ソフト」API も含まれています。

3.2.1.権限

デバイス実装者は、パーミッションのリファレンス ページ [参考文献、6]に記載されているすべてのパーミッション定数をサポートし、強制しなければなりません (MUST)。セクション 9 には、Android セキュリティ モデルに関連する追加要件がリストされていることに注意してください。

3.2.2.ビルドパラメータ

Android API には、現在のデバイスを記述することを目的とした android.os.Build クラス [ Resources, 7 ] の多数の定数が含まれています。デバイス実装間で一貫した意味のある値を提供するために、以下の表には、デバイス実装が準拠しなければならないこれらの値の形式に関する追加の制限が含まれています。

パラメータ

詳細

バージョン.リリース

現在実行されている Android システムのバージョン (人間が判読できる形式)。このフィールドには、[ Resources, 8]で定義された文字列値のいずれかがなければなりません (MUST)。

バージョン.SDK

現在実行中の Android システムのバージョン (サードパーティのアプリケーション コードにアクセスできる形式)。 Android 5.0 の場合、このフィールドは整数値 21 でなければなりません。

VERSION.SDK_INT

現在実行中の Android システムのバージョン (サードパーティのアプリケーション コードにアクセスできる形式)。 Android 5.0 の場合、このフィールドは整数値 21 でなければなりません。

バージョン.増分

デバイス実装者によって選択された値で、現在実行中の Android システムの特定のビルドを人間が判読できる形式で指定します。この値は、エンドユーザーが利用できるさまざまなビルドに再利用してはなりません。このフィールドの通常の使用法は、ビルドの生成に使用されたビルド番号またはソース管理変更識別子を示すことです。このフィールドの特定の形式に関する要件はありませんが、null または空の文字列 ("") であってはなりません。

ボード

デバイスが使用する特定の内部ハードウェアを識別する、デバイス実装者によって選択された値 (人が読める形式)。このフィールドの用途としては、デバイスに電力を供給するボードの特定のリビジョンを示すことが考えられます。このフィールドの値は 7 ビット ASCII としてエンコード可能であり、正規表現 "^[a-zA-Z0-9_-]+$" と一致する必要があります。

ブランド

エンド ユーザーに知られている、デバイスに関連付けられたブランド名を反映する値。人間が読める形式でなければならず、デバイスの製造元、またはデバイスが販売されている企業ブランドを表す必要があります。このフィールドの値は 7 ビット ASCII としてエンコード可能であり、正規表現 "^[a-zA-Z0-9_-]+$" と一致する必要があります。

SUPPORTED_ABIS

ネイティブ コードの命令セット (CPU タイプ + ABI 規則) の名前。セクション 3.3 を参照してください。ネイティブ API の互換性

SUPPORTED_32_BIT_ABIS

ネイティブ コードの命令セット (CPU タイプ + ABI 規則) の名前。セクション 3.3 を参照してください。ネイティブ API の互換性

SUPPORTED_64_BIT_ABIS

ネイティブ コードの 2 番目の命令セット (CPU タイプ + ABI 規則) の名前。セクション 3.3 を参照してください。ネイティブ API の互換性

CPU_ABI

ネイティブ コードの命令セット (CPU タイプ + ABI 規則) の名前。セクション 3.3 を参照してください。ネイティブ API の互換性

CPU_ABI2

ネイティブ コードの 2 番目の命令セット (CPU タイプ + ABI 規則) の名前。セクション 3.3 を参照してください。ネイティブ API の互換性

デバイス

デバイスの実装者によって選択された値。ハードウェア機能の構成とデバイスの工業デザインを識別する開発名またはコード名が含まれます。このフィールドの値は 7 ビット ASCII としてエンコード可能であり、正規表現 "^[a-zA-Z0-9_-]+$" と一致する必要があります。

指紋

このビルドを一意に識別する文字列。人間が十分に判読できる必要があります。このテンプレートに従う必要があります。

$(ブランド)/$(製品)/$(デバイス):$(バージョン.リリース)/$(ID)/$(バージョン.増分):$(タイプ)/$(タグ)

例えば:

acme/myproduct/mydevice:5.0/LRWXX/3359:userdebug/test-keys

フィンガープリントには空白文字を含めてはなりません。上記のテンプレートに含まれる他のフィールドに空白文字がある場合は、ビルド フィンガープリント内でアンダースコア ("_") 文字などの別の文字に置き換える必要があります。このフィールドの値は 7 ビット ASCII としてエンコード可能でなければなりません (MUST)。

ハードウェア

ハードウェアの名前 (カーネル コマンド ラインまたは /proc から)。人間が十分に判読できる必要があります。このフィールドの値は 7 ビット ASCII としてエンコード可能であり、正規表現 "^[a-zA-Z0-9_-]+$" と一致する必要があります。

ホスト

ビルドが構築されたホストを一意に識別する文字列 (人間が判読できる形式)。このフィールドの特定の形式に関する要件はありませんが、null または空の文字列 ("") であってはなりません。

ID

特定のリリースを参照するためにデバイス実装者によって選択された、人間が判読可能な形式の識別子。このフィールドは android.os.Build.VERSION.INCREMENTAL と同じにすることができますが、エンド ユーザーがソフトウェア ビルドを区別するのに十分な意味のある値である必要があります (SHOULD)。このフィールドの値は 7 ビット ASCII としてエンコード可能であり、正規表現 "^[a-zA-Z0-9._-]+$" と一致する必要があります。

メーカー

製品の相手先商標製品製造業者 (OEM) の商品名。このフィールドの特定の形式に関する要件はありませんが、null または空の文字列 ("") であってはなりません。

モデル

エンドユーザーに知られているデバイスの名前を含む、デバイス実装者によって選択された値。これは、デバイスがエンドユーザーに販売されるときと同じ名前である必要があります。このフィールドの特定の形式に関する要件はありませんが、null または空の文字列 ("") であってはなりません。

製品

特定の製品 (SKU) の開発名またはコード名を含む、デバイス実装者によって選択された値。同じブランド内で一意である必要があります。人間が読める形式でなければなりませんが、必ずしもエンドユーザーによる閲覧を目的としたものではありません。このフィールドの値は 7 ビット ASCII としてエンコード可能であり、正規表現 "^[a-zA-Z0-9_-]+$" と一致する必要があります。

シリアル

ハードウェアのシリアル番号。これは使用可能である必要があります。このフィールドの値は 7 ビット ASCII としてエンコード可能であり、正規表現 "^([a-zA-Z0-9]{6,20})$" に一致する必要があります。

タグ

ビルドをさらに区別するためにデバイス実装者によって選択されたタグのカンマ区切りのリスト。このフィールドには、release-keys、dev-keys、test-keys の 3 つの典型的な Android プラットフォーム署名構成に対応する値のいずれかがなければなりません。

時間

ビルドが行われたときのタイムスタンプを表す値。

タイプ

ビルドの実行時構成を指定するデバイス実装者によって選択された値。このフィールドには、user、userdebug、または eng の 3 つの一般的な Android ランタイム設定に対応する値のいずれかがなければなりません。

ユーザー

ビルドを生成したユーザー (または自動ユーザー) の名前またはユーザー ID。このフィールドの特定の形式に関する要件はありませんが、null または空の文字列 ("") であってはなりません。

3.2.3.インテントの互換性

以下のセクションで説明するように、デバイス実装は Android の疎結合インテント システムを尊重しなければなりません (MUST)。 「承認」とは、デバイス実装者が、指定された各インテント パターンにバインドして正しい動作を実装する、一致するインテント フィルターを指定する Android アクティビティまたはサービスを提供しなければならないことを意味します。

3.2.3.1.コアアプリケーションの意図

Android インテントを使用すると、アプリケーション コンポーネントが他の Android コンポーネントに機能をリクエストできるようになります。 Android アップストリーム プロジェクトには、一般的なアクションを実行するためのいくつかのインテント パターンを実装する、コア Android アプリケーションとみなされるアプリケーションのリストが含まれています。コアとなる Android アプリケーションは次のとおりです。

  • 卓上時計
  • ブラウザ
  • カレンダー
  • 連絡先
  • ギャラリー
  • グローバルサーチ
  • ランチャー
  • 音楽
  • 設定

デバイス実装には、必要に応じてコア Android アプリケーションを含める必要がありますが、これらのコア Android アプリケーションのすべての「パブリック」アクティビティまたはサービス コンポーネントによって定義されているのと同じインテント パターンを実装するコンポーネントを含めなければなりません。属性 android:exported が存在しないか、値が true の場合、アクティビティまたはサービス コンポーネントは「パブリック」とみなされます。

3.2.3.2.インテントのオーバーライド

Android は拡張可能なプラットフォームであるため、デバイス実装では、セクション 3.2.3.1で参照されている各インテント パターンをサードパーティ アプリケーションによってオーバーライドできるようにしなければなりません (MUST)。アップストリームの Android オープンソース実装では、デフォルトでこれが許可されています。デバイス実装者は、システム アプリケーションによるこれらのインテント パターンの使用に特別な権限を付与したり、サードパーティ アプリケーションがこれらのパターンにバインドして制御を引き受けたりすることを妨げてはなりません。この禁止には、特に、すべて同じインテント パターンを処理する複数のアプリケーション間でユーザーが選択できるようにする「Chooser」ユーザー インターフェイスを無効にすることが含まれますが、これに限定されません。

ただし、デフォルトのアクティビティがデータ URI に対してより具体的なフィルタを提供する場合、デバイス実装は、特定の URI パターン (例: http://play.google.com) に対してデフォルトのアクティビティを提供してもよい(MAY)。たとえば、データ URI「http://www.android.com」を指定するインテント フィルターは、「http://」のブラウザー フィルターよりも具体的です。デバイス実装は、ユーザーがインテントのデフォルトのアクティビティを変更するためのユーザー インターフェイスを提供しなければなりません。

3.2.3.3.インテントの名前空間

デバイス実装には、android.* または com.android.* 名前空間内の ACTION、CATEGORY、またはその他のキー文字列を使用して、新しいインテントまたはブロードキャスト インテント パターンを受け入れる Android コンポーネントを含めてはなりません。デバイス実装者は、別の組織に属するパッケージ スペース内の ACTION、CATEGORY、またはその他のキー文字列を使用して、新しいインテントまたはブロードキャスト インテント パターンを尊重する Android コンポーネントを含めてはなりません。デバイス実装者は、セクション 3.2.3.1にリストされているコア アプリで使用されるインテント パターンを変更または拡張してはなりません。デバイス実装には、自身の組織に明確かつ明らかに関連付けられた名前空間を使用するインテント パターンを含めてもよい(MAY)。この禁止事項は、セクション 3.6で Java 言語クラスに対して指定された禁止事項に似ています。

3.2.3.4.ブロードキャストインテント

サードパーティ アプリケーションは、プラットフォームに依存して特定のインテントをブロードキャストし、ハードウェアまたはソフトウェア環境の変更を通知します。 Android 互換デバイスは、適切なシステム イベントに応じてパブリック ブロードキャスト インテントをブロードキャストしなければなりません。ブロードキャスト インテントについては、SDK ドキュメントで説明されています。

3.2.3.5.デフォルトのアプリ設定

Android には、ホーム画面や SMS などのデフォルトのアプリケーションを簡単に選択する方法をユーザーに提供する設定が含まれています。意味がある場合、デバイス実装は同様の設定メニューを提供し、以下のように SDK ドキュメントで説明されているインテント フィルター パターンおよび API メソッドと互換性がなければなりません。

デバイスの実装:

  • デバイス実装が android.software.home_screen を報告する場合、ホーム画面のデフォルトのアプリ設定メニューを表示するという android.settings.HOME_SETTINGS インテントを尊重しなければなりません [参考文献、10]
  • デバイス実装が android.hardware.telephony を報告する場合、デフォルトの SMS アプリケーションを変更するダイアログを表示するために、 android.provider.Telephony.ACTION_CHANGE_DEFAULT インテントを呼び出す設定メニューを提供しなければなりません [参考文献、9 ]
  • デバイス実装が android.hardware.nfc.hce を報告する場合、タップ アンド ペイのデフォルトのアプリ設定メニューを表示するという android.settings.NFC_PAYMENT_SETTINGS インテントを尊重しなければなりません [参考文献、10]

3.3.ネイティブ API の互換性

3.3.1 アプリケーションバイナリインターフェイス

マネージド Dalvik バイトコードは、適切なデバイス ハードウェア アーキテクチャ用にコンパイルされた ELF .so ファイルとしてアプリケーションの .apk ファイルで提供されるネイティブ コードを呼び出すことができます。ネイティブ コードは基盤となるプロセッサ テクノロジに大きく依存しているため、Android は Android NDK で多数のアプリケーション バイナリ インターフェイス (ABI) を定義しています。デバイス実装は 1 つ以上の定義された ABI と互換性がなければならず、以下のように Android NDK との互換性を実装しなければなりません。

デバイス実装に Android ABI のサポートが含まれている場合、次のようになります。

  • 標準の Java Native Interface (JNI) セマンティクスを使用して、ネイティブ コードを呼び出すために管理環境で実行されるコードのサポートを含めなければなりません。
  • 以下のリストにある必要なライブラリごとに、ソース互換性 (つまり、ヘッダー互換性) およびバイナリ互換性 (ABI の場合) がなければなりません。
  • 64 ビット ABI がサポートされている場合は、同等の 32 ビット ABI をサポートしなければなりません
  • android.os.Build.SUPPORTED_ABIS、android.os.Build.SUPPORTED_32_BIT_ABIS、および android.os.Build.SUPPORTED_64_BIT_ABIS パラメーターを介して、デバイスによってサポートされているネイティブ アプリケーション バイナリ インターフェイス (ABI) を正確に報告しなければなりません。それぞれのパラメーターはカンマ区切りのリストです。 ABI は最も優先度の高いものから順に並べられています。
  • 上記のパラメータを介して、Android NDK の最新バージョン「NDK Programmer's Guide | NDK Programmer's Guide | NDK Programmer's Guide」に文書化されている ABI のみを報告しなければなりません (MUST)。 docs/ ディレクトリ内の「ABI 管理」
  • 上流の Android オープンソース プロジェクトで利用可能なソース コードとヘッダー ファイルを使用してビルドする必要があります (SHOULD)

次のネイティブ コード API は、ネイティブ コードを含むアプリで利用できなければなりません。

  • libc (C ライブラリ)
  • libm (数学ライブラリ)
  • C++ の最小限のサポート
  • JNIインターフェース
  • liblog (Android ログ)
  • libz (Zlib 圧縮)
  • libdl (動的リンカー)
  • libGLESv1_CM.so (OpenGL ES 1.x)
  • libGLESv2.so (OpenGL ES 2.0)
  • libGLESv3.so (OpenGL ES 3.x)
  • libEGL.so (ネイティブ OpenGL サーフェス管理)
  • libjnigraphics.so
  • libOpenSLES.so (OpenSL ES 1.0.1 オーディオサポート)
  • libOpenMAXAL.so (OpenMAX AL 1.0.1 サポート)
  • libandroid.so (ネイティブ Android アクティビティ サポート)
  • libmediandk.so (ネイティブ メディア API サポート)
  • 以下で説明する OpenGL のサポート

Android NDK の将来のリリースでは、追加の ABI のサポートが導入される可能性があることに注意してください。デバイス実装が既存の事前定義された ABI と互換性がない場合、ABI のサポートをまったく報告してはなりません (MUST NOT)。

デバイス実装には libGLESv3.so が含まれなければならず、libGLESv2.so へのシンボリックリンク (シンボリック リンク) が必要であることに注意してください。次に、NDK リリース android-21 で定義されているすべての OpenGL ES 3.1 および Android Extension Pack [ Resources, 11 ] 関数シンボルをエクスポートしなければなりません。すべてのシンボルが存在する必要がありますが、デバイスで実際にサポートされている OpenGL ES バージョンおよび拡張機能に対応する機能のみが完全に実装されている必要があります。

ネイティブ コードの互換性は困難です。このため、デバイス実装者は、上流の Android オープンソース プロジェクトからの上記のライブラリの実装を使用することを強くお勧めします

3.4.ウェブ互換性

3.4.1. WebView の互換性

android.webkit.Webview API の完全な実装は Android Watch デバイスで提供されてもよいですが、他のすべてのタイプのデバイス実装では提供されなければなりません (MUST)。

プラットフォーム機能 android.software.webview は、android.webkit.WebView API の完全な実装を提供するデバイスで報告されなければなりません (MUST)。API が完全に実装されていないデバイスでは報告してはなりません。 Android オープンソース実装では、Chromium プロジェクトのコードを使用して android.webkit.WebView を実装します [参考文献、12 ]。 Web レンダリング システム用の包括的なテスト スイートを開発することは現実的ではないため、デバイス実装者は、WebView 実装で Chromium の特定のアップストリーム ビルドを使用する必要があります。具体的には:

  • デバイスの android.webkit.WebView 実装は、Android 5.0 用のアップストリーム Android オープンソース プロジェクトの Chromium ビルドに基づいていなければなりません。このビルドには、WebView の特定の機能セットとセキュリティ修正が含まれています [参考文献、13 ]。
  • WebView によって報告されるユーザー エージェント文字列は、次の形式でなければなりません。

Mozilla/5.0 (Linux; Android $(VERSION); $(MODEL) Build/$(BUILD)) AppleWebKit/537.36 (Gecko のような KHTML) バージョン/4.0 $(CHROMIUM_VER) Mobile Safari/537.36

  • $(VERSION) 文字列の値は、android.os.Build.VERSION.RELEASE の値と同じでなければなりません。
  • $(MODEL) 文字列の値は、android.os.Build.MODEL の値と同じでなければなりません。
  • $(BUILD) 文字列の値は、android.os.Build.ID の値と同じでなければなりません。
  • $(CHROMIUM_VER) 文字列の値は、上流の Android オープンソース プロジェクトの Chromium のバージョンでなければなりません。
  • デバイス実装では、ユーザー エージェント文字列内の Mobile を省略してもよい (MAY)。

WebView コンポーネントには、可能な限り多くの HTML5 機能のサポートが含まれている必要があり (SHOULD)、その機能をサポートする場合は、HTML5 仕様に準拠する必要があります [参考文献、14 ]。

3.4.2.ブラウザの互換性

Android テレビおよび時計デバイスはブラウザ アプリケーションを省略してもよい (MAY) が、セクション 3.2.3.1で説明されているパブリック インテント パターンをサポートしなければなりません (MUST)。他のすべてのタイプのデバイス実装には、一般ユーザーの Web ブラウジング用のスタンドアロン ブラウザ アプリケーションが含まれなければなりません。

スタンドアロン ブラウザは、WebKit 以外のブラウザ テクノロジに基づいていてもよい (MAY)。ただし、代替ブラウザ アプリケーションが使用される場合でも、セクション 3.4.1で説明されているように、サードパーティ アプリケーションに提供される android.webkit.WebView コンポーネントは WebKit に基づいていなければなりません。

実装では、スタンドアロンのブラウザ アプリケーションにカスタム ユーザー エージェント文字列を含めることができます (MAY)。

スタンドアロンのブラウザ アプリケーション (上流の WebKit ブラウザ アプリケーションに基づいているか、サードパーティの代替品に基づいているかに関係なく) は、可能な限り HTML5 のサポートを含むべきです [参考文献、14 ]。少なくとも、デバイス実装は、HTML5 に関連付けられた次の API をそれぞれサポートしなければなりません。

さらに、デバイス実装は HTML5/W3C Webstorage API [参考文献、18 ] をサポートしなければならず、HTML5/W3C IndexedDB API [参考文献、19 ] をサポートすべきです。 Web 開発標準化団体が WebStorage よりも IndexedDB を優先する方向に移行しているため、IndexedDB は Android の将来のバージョンで必須のコンポーネントになることが予想されます。

3.5. API の動作の互換性

各 API タイプ (マネージド、ソフト、ネイティブ、Web) の動作は、上流の Android オープンソース プロジェクト [参考文献、2 ] の推奨実装と一致している必要があります。互換性のある具体的な領域は次のとおりです。

  • デバイスは、標準インテントの動作やセマンティクスを変更してはなりません。
  • デバイスは、特定の種類のシステム コンポーネント (サービス、アクティビティ、コンテンツ プロバイダーなど) のライフサイクルまたはライフサイクル セマンティクスを変更してはなりません。
  • デバイスは、標準のアクセス許可のセマンティクスを変更してはなりません。

上記のリストは包括的なものではありません。互換性テスト スイート (CTS) は、動作の互換性についてプラットフォームの重要な部分をテストしますが、すべてをテストするわけではありません。 Android オープンソース プロジェクトとの動作互換性を確保するのは実装者の責任です。このため、デバイス実装者は、システムの重要な部分を再実装するのではなく、可能な限り Android オープンソース プロジェクト経由で入手可能なソース コードを使用する必要があります (SHOULD)。

3.6. API 名前空間

Android は、Java プログラミング言語で定義されたパッケージおよびクラスの名前空間規則に従います。サードパーティ アプリケーションとの互換性を確保するために、デバイス実装者は、これらのパッケージ名前空間に対して禁止されている変更 (以下を参照) を行ってはなりません。

  • ジャバ.*
  • javax.*
  • 太陽。*
  • アンドロイド。*
  • com.android.*

禁止されている変更には次のものが含まれます

  • デバイス実装は、メソッドやクラスのシグネチャを変更したり、クラスやクラス フィールドを削除したりして、Android プラットフォーム上で公開されている API を変更してはなりません。
  • デバイス実装者は、API の基礎となる実装を変更してもよい (MAY) が、そのような変更は、公開されている API の規定された動作や Java 言語の署名に影響を与えてはなりません (MUST NOT)。
  • デバイス実装者は、公開されている要素 (クラスやインターフェイス、既存のクラスやインターフェイスへのフィールドやメソッドなど) を上記の API に追加してはなりません。

「パブリックに公開された要素」とは、アップストリームの Android ソース コードで使用されているように、「@hide」マーカーで装飾されていない構成要素です。言い換えれば、デバイス実装者は、上記の名前空間で新しい API を公開したり、既存の API を変更してはなりません (MUST NOT)。デバイス実装者は内部のみの変更を行うことができますが、それらの変更を宣伝したり、開発者に公開したりしてはなりません。

デバイス実装者はカスタム API を追加してもよいですが、そのような API を別の組織が所有する名前空間に含めたり、別の組織を参照したりしてはなりません。たとえば、デバイス実装者は com.google.* または同様の名前空間に API を追加してはなりません。追加できるのは Google だけです。同様に、Google は他社の名前空間に API を追加してはなりません。さらに、デバイス実装に標準の Android 名前空間外のカスタム API が含まれている場合、それらの API は、(メカニズム)は、そのような API のメモリ使用量の増加によって影響を受けます。

デバイス実装者が上記のパッケージ名前空間の 1 つを改善することを提案する場合 (既存の API に有用な新機能を追加する、または新しい API を追加するなど)、実装者はsource.android.com にアクセスし、変更を提供するプロセスを開始する必要があります (SHOULD)。そのサイトの情報によると、コード。

上記の制限は、Java プログラミング言語での API の命名に関する標準規則に対応していることに注意してください。このセクションは単にこれらの規約を強化し、この互換性定義に含めることによって拘束力を持たせることを目的としています。

3.7.ランタイム互換性

デバイス実装は、完全な Dalvik Executable (DEX) 形式と Dalvik バイトコードの仕様とセマンティクスをサポートしなければなりません [参考文献、20 ]。デバイス実装者は、Dalvik 実行可能形式のリファレンス上流実装である ART、およびリファレンス実装のパッケージ管理システムを使用する必要があります (SHOULD)。

デバイス実装は、アップストリームの Android プラットフォームに従って、次の表で指定されているようにメモリを割り当てるように Dalvik ランタイムを構成しなければなりません (MUST)。 (画面サイズと画面密度の定義については、セクション 7.1.1を参照してください。)

以下に指定されるメモリ値は最小値とみなされ、デバイス実装はアプリケーションごとにさらに多くのメモリを割り当てることができることに注意してください。

画面レイアウト

画面密度

最小アプリケーションメモリ

小さい/普通

120dpi(ldpi)

16MB

160 dpi (mdpi)

213 dpi (テレビ dpi)

32MB

240 dpi (hdpi)

320 dpi (xhdpi)

64MB

400dpi (400dpi)

96MB

480 dpi (xxhdpi)

128MB

560dpi (560dpi)

192MB

640 dpi (xxxhdpi)

256MB

大きい

120dpi(ldpi)

16MB

160 dpi (mdpi)

32MB

213 dpi (テレビ dpi)

64MB

240 dpi (hdpi)

320 dpi (xhdpi)

128MB

400dpi (400dpi)

192MB

480 dpi (xxhdpi)

256MB

560dpi (560dpi)

384MB

640 dpi (xxxhdpi)

512MB

×ラージ

160 dpi (mdpi)

64MB

213 dpi (テレビ dpi)

96MB

240 dpi (hdpi)

320 dpi (xhdpi)

192MB

400dpi (400dpi)

288MB

480 dpi (xxhdpi)

384MB

560dpi (560dpi)

576MB

640 dpi (xxxhdpi)

768MB

3.8.ユーザーインターフェイスの互換性

3.8.1.ランチャー(ホーム画面)

Android には、ランチャー アプリケーション (ホーム画面) と、デバイス ランチャー (ホーム画面) を置き換えるサードパーティ アプリケーションのサポートが含まれています。サードパーティのアプリケーションがデバイスのホーム画面を置き換えることを許可するデバイス実装では、プラットフォーム機能 android.software.home_screen を宣言する必要があります。

3.8.2.ウィジェット

ウィジェットはすべての Android デバイス実装ではオプションですが、Android ハンドヘルド デバイスではサポートされるべきです (SHOULD)。

Android は、アプリケーションが「AppWidget」をエンドユーザーに公開できるようにするコンポーネント タイプと、対応する API およびライフサイクルを定義します [参考文献、21 ]。この機能は、ハンドヘルド デバイスの実装でサポートされることが強く推奨されます。ホーム画面へのウィジェットの埋め込みをサポートするデバイス実装は、次の要件を満たし、プラットフォーム機能 android.software.app_widgets のサポートを宣言する必要があります。

  • デバイス ランチャーには、AppWidget のサポートが組み込まれており、Launcher 内で直接 AppWidget を追加、構成、表示、削除するためのユーザー インターフェイス アフォーダンスを公開しなければなりません。
  • デバイス実装は、標準グリッド サイズで 4 x 4 のウィジェットをレンダリングできなければなりません。詳細については、Android SDK ドキュメント [参考文献、21 ] のアプリ ウィジェット設計ガイドラインを参照してください。
  • ロック画面のサポートを含むデバイス実装は、ロック画面上のアプリケーション ウィジェットをサポートしてもよい(MAY)。

3.8.3.通知

Android には、開発者がデバイスのハードウェアおよびソフトウェア機能を使用して、注目すべきイベントをユーザーに通知できる API が含まれています [参考文献、22 ]。

一部の API を使用すると、アプリケーションはハードウェア (特に音、振動、光) を使用して通知を実行したり、注意を引いたりすることができます。デバイス実装は、SDK ドキュメントに記載されているように、デバイス実装ハードウェアで可能な範囲で、ハードウェア機能を使用する通知をサポートしなければなりません (MUST)。たとえば、デバイス実装にバイブレーターが含まれている場合、デバイス実装は振動 API を正しく実装しなければなりません (MUST)。デバイス実装にハードウェアがない場合、対応する API は no-ops として実装されなければなりません (MUST)。この動作については、セクション 7でさらに詳しく説明します。

さらに、実装では、API [リソース、23 ] またはステータス/システム バー アイコン スタイル ガイド [リソース、24 ] で提供されるすべてのリソース (アイコン、サウンド ファイルなど) を正しくレンダリングしなければなりません。デバイス実装者は、リファレンス Android オープンソース実装によって提供されるものとは異なる通知のユーザー エクスペリエンスを提供してもよい (MAY)。ただし、そのような代替通知システムは、上記のように既存の通知リソースをサポートしなければなりません。

Android には、次のようなさまざまな通知のサポートが含まれています。

  • 豊富な通知- 進行中の通知のインタラクティブ ビュー。
  • ヘッズアップ通知 -インタラクティブ ビュー ユーザーは、現在のアプリを離れることなく操作したり、無視したりできます。
  • ロック画面通知- ロック画面上に表示される通知。可視性を細かく制御できます。

デバイス実装は、Android API [参考資料、25]に記載されているタイトル/名前、アイコン、テキストを含むこれらの通知を適切に表示および実行しなければなりません (MUST)。

Android には、アプリ (ユーザーが明示的に有効にすると) が投稿または更新されるすべての通知のコピーを受信できるようにする通知リスナー サービス API が含まれています。デバイス実装は、Notification オブジェクトに添付されたすべてのメタデータを含む、インストールされているユーザー有効リスナー サービスすべてに、通知全体を正確かつ迅速に送信しなければなりません (MUST)。

Android には、開発者がアプリケーションに検索を組み込み、アプリケーションのデータをグローバル システム検索に公開できるようにする API [参考文献、26 ] が含まれています。一般に、この機能は、ユーザーがクエリを入力し、入力時に提案を表示し、結果を表示できる単一のシステム全体のユーザー インターフェイスで構成されます。 Android API を使用すると、開発者はこのインターフェイスを再利用して独自のアプリ内で検索を提供し、共通のグローバル検索ユーザー インターフェイスに結果を提供できるようになります。

Android デバイスの実装には、ユーザー入力に応じてリアルタイムで提案を行うことができる、システム全体で共有される単一の検索ユーザー インターフェイスであるグローバル検索を含めるべきです(SHOULD)。デバイス実装は、開発者がこのユーザー インターフェイスを再利用して独自のアプリケーション内で検索を提供できるようにする API を実装する必要があります (SHOULD)。グローバル検索インターフェイスを実装するデバイス実装は、サードパーティ アプリケーションがグローバル検索モードで実行されているときに検索ボックスに候補を追加できるようにする API を実装しなければなりません。この機能を利用するサードパーティのアプリケーションがインストールされていない場合、デフォルトの動作では、Web 検索エンジンの結果と提案を表示する必要があります (SHOULD)。

3.8.5.乾杯

アプリケーションは、「トースト」API を使用して、短い非モーダル文字列をエンドユーザーに表示できます。この文字列は、短期間で消えます [参考文献、27 ]。デバイス実装は、アプリケーションからエンドユーザーへのトーストを、何らかの視認性の高い方法で表示しなければなりません (MUST)。

3.8.6.テーマ

Android では、アプリケーションがアクティビティまたはアプリケーション全体にスタイルを適用するためのメカニズムとして「テーマ」を提供しています。

Android には、アプリケーション開発者が Android SDK で定義されている Holo テーマの外観と雰囲気を一致させたい場合に使用する定義済みスタイルのセットとして、「Holo」テーマ ファミリが含まれています [参考文献、28 ]。デバイス実装は、アプリケーションに公開される Holo テーマ属性を変更してはなりません [参考文献、29 ]。

Android 5.0 には、アプリケーション開発者がさまざまな種類の Android デバイスにわたってデザイン テーマの外観と雰囲気を一致させたい場合に使用できる、定義済みのスタイルのセットとして「マテリアル」テーマ ファミリが含まれています。デバイス実装は、「マテリアル」テーマ ファミリをサポートしなければならず、アプリケーションに公開されるマテリアル テーマ属性またはそのアセットを変更してはなりません [参考文献、30 ]。

Android には、アプリケーション開発者がデバイス実装者によって定義されたデバイス テーマの外観と雰囲気を一致させたい場合に使用する定義済みスタイルのセットとして、「デバイス デフォルト」テーマ ファミリも含まれています。デバイス実装は、アプリケーションに公開されるデバイスのデフォルトのテーマ属性を変更してもよい[参考文献、29 ]。

Android は、半透明のシステム バーを備えた新しいバリアント テーマをサポートしています。これにより、アプリケーション開発者は、ステータス バーとナビゲーション バーの後ろの領域をアプリのコンテンツで埋めることができます。この構成で一貫した開発者エクスペリエンスを実現するには、ステータス バーのアイコンのスタイルがさまざまなデバイス実装間で維持されることが重要です。したがって、Android デバイスの実装では、アイコンが問題のあるステータスを示している場合を除き、システム ステータス アイコン (信号強度やバッテリー レベルなど) とシステムによって発行される通知に白を使用しなければなりません [参考文献、29 ]。

3.8.7.ライブ壁紙

Android は、アプリケーションが 1 つ以上の「ライブ壁紙」をエンドユーザーに公開できるようにするコンポーネント タイプと、対応する API およびライフサイクルを定義します [参考文献、31 ]。ライブ壁紙は、他のアプリケーションの背後に壁紙として表示される、入力機能が制限されたアニメーション、パターン、または同様の画像です。

ハードウェアは、機能に制限がなく、他のアプリケーションに悪影響を及ぼさず妥当なフレーム レートですべてのライブ壁紙を実行できる場合、ライブ壁紙を確実に実行できるとみなされます。ハードウェアの制限により、壁紙やアプリケーションがクラッシュしたり、誤動作したり、過剰な CPU やバッテリー電力を消費したり、許容できないほど低いフレーム レートで実行されたりする場合、そのハードウェアはライブ壁紙を実行できないとみなされます。たとえば、一部のライブ壁紙では、OpenGL 2.0 または 3.x コンテキストを使用してコンテンツをレンダリングする場合があります。ライブ壁紙の OpenGL コンテキストの使用は、同様に OpenGL コンテキストを使用する他のアプリケーションと競合する可能性があるため、複数の OpenGL コンテキストをサポートしていないハードウェアではライブ壁紙は確実に実行されません。

上記のようにライブ壁紙を確実に実行できるデバイス実装はライブ壁紙を実装すべきであり、実装された場合はプラットフォーム機能フラグ android.software.live_wallpaper を報告しなければなりません。

3.8.8.アクティビティの切り替え

最近の機能ナビゲーション キーはオプションであるため、Android テレビ デバイスと Android Watch デバイスの概要画面を実装するための要件はオプションです。

アップストリームの Android ソース コードには、概要画面 [ Resources, 32 ] が含まれています。これは、ユーザーが最後にアプリケーションを終了した瞬間のアプリケーションのグラフィック状態のサムネイル イメージを使用して、タスクを切り替え、最近アクセスしたアクティビティとタスクを表示するためのシステム レベルのユーザー インターフェイスです。セクション 7.2.3で詳述されているように、最近の機能ナビゲーション キーを含むデバイス実装は、インターフェイスを変更してもよい (MAY) が、次の要件を満たさなければなりません (MUST)。

  • 関連する最近の情報を、一緒に移動するグループとして表示しなければなりません
  • 少なくとも最大 20 個の表示アクティビティをサポートしなければなりません
  • 少なくとも一度に 4 つのアクティビティのタイトルを表示する必要があります
  • ハイライトの色、アイコン、最近の画面のタイトルを表示すべきです
  • 画面の固定動作 [参考文献、33 ] を実装し、機能を切り替えるための設定メニューをユーザーに提供しなければなりません。
  • 終了アフォーダンス (「x」) を表示すべきですが、ユーザーが画面を操作するまでこれを遅らせてもよいです

デバイス実装では、概要画面にアップストリームの Android ユーザー インターフェイス (または同様のサムネイル ベースのインターフェイス) を使用することが強く推奨されます。

3.8.9.入力管理

Android には、入力管理のサポートとサードパーティのインプットメソッドエディターのサポートが含まれています [参考文献、34 ]。ユーザーがデバイス上でサードパーティの入力メソッドを使用できるようにするデバイス実装は、プラットフォーム機能 android.software.input_methods を宣言し、Android SDK ドキュメントで定義されている IME API をサポートする必要があります。

android.software.input_methods 機能を宣言するデバイス実装は、サードパーティの入力メソッドを追加および構成するためのユーザーがアクセスできるメカニズムを提供しなければなりません (MUST)。デバイス実装は、android.settings.INPUT_METHOD_SETTINGS インテントに応じて設定インターフェイスを表示しなければなりません。

3.8.10。ロック画面メディアコントロール

リモート コントロール クライアント API は Android 5.0 から非推奨となり、メディア アプリケーションがロック画面に表示される再生コントロールと統合できるようにするメディア通知テンプレートが採用されました [参考文献、35 ]。デバイスのロック画面をサポートするデバイス実装は、他の通知とともにメディア通知テンプレートをサポートしなければなりません。

3.8.11。夢

Android には、Dreams と呼ばれる対話型スクリーンセーバーのサポートが含まれています [参考文献、36 ]。 Dreams を使用すると、電源に接続されたデバイスがアイドル状態であるか、デスクのドックにドッキングされているときに、ユーザーがアプリケーションを操作できるようになります。 Android Watch デバイスは Dreams を実装してもよい (MAY) が、他のタイプのデバイス実装には Dreams のサポートが含まれ、 android.settings.DREAM_SETTINGS インテントに応じてユーザーが Dreams を構成するための設定オプションを提供すべきである (SHOULD)。

3.8.12。位置

デバイスが位置座標を提供できるハードウェア センサー (GPS など) を備えている場合、設定 [リソース、37 ] 内の位置メニューに位置モードを表示しなければなりません。

3.8.13。 Unicode とフォント

Android には、カラー絵文字のサポートが含まれています。 Android デバイスの実装に IME が含まれる場合、デバイスは Unicode 6.1 で定義されている絵文字の入力方法をユーザーに提供しなければなりません [参考文献、38 ]。すべてのデバイスは、これらの絵文字をカラーグリフでレンダリングできなければなりません。

Android 5.0 には、さまざまなウェイトの Roboto 2 フォント (sans-serif-thin、sans-serif-light、sans-serif-medium、sans-serif-black、sans-serif-condensed、sans-serif-condensed-light) のサポートが含まれています。これらは、デバイスで利用可能な言語と、ラテン拡張 A、B、C、D 範囲を含むラテン語、ギリシャ語、キリル文字の Unicode 7.0 の完全なカバレッジ、および Unicode 7.0 の通貨記号ブロック内のすべてのグリフをすべて含める必要があります。 。

3.9.デバイス管理

Android には、Android Device Administration API [参考文献、39 ] を介して、セキュリティ対応アプリケーションがパスワード ポリシーの強制やリモート ワイプの実行などのデバイス管理機能をシステム レベルで実行できるようにする機能が含まれています。デバイス実装は、DevicePolicyManager クラスの実装を提供しなければなりません [参考文献、40 ]。ロック画面のサポートを含むデバイス実装は、Android SDK ドキュメント [参考文献、39 ] で定義されているデバイス管理ポリシーの全範囲をサポートし、プラットフォーム機能 android.software.device_admin を報告しなければなりません。

デバイス実装には、デバイス管理機能を実行するアプリケーションがプレインストールされていても構いません (MAY) が、このアプリケーションをデフォルトのデバイス所有者アプリとしてすぐに設定してはなりません [参考文献、41 ]。

3.10.アクセシビリティ

Android は、障害のあるユーザーがデバイスをより簡単に操作できるようにするアクセシビリティ レイヤーを提供します。さらに、Android は、アクセシビリティ サービス実装がユーザーおよびシステム イベントのコールバックを受信し、テキスト読み上げ、触覚フィードバック、トラックボール/D パッド ナビゲーションなどの代替フィードバック メカニズムを生成できるようにするプラットフォーム API を提供します [参考文献、42 ]。デバイス実装は、デフォルトの Android 実装と一致する Android アクセシビリティ フレームワークの実装を提供しなければなりません (MUST)。デバイス実装は次の要件を満たさなければなりません。

  • android.accessibilityservice API を通じてサードパーティのアクセシビリティ サービス実装をサポートしなければなりません [参考文献、43 ]
  • AccessibilityEvent を生成し、デフォルトの Android 実装と一致する方法で、これらのイベントを登録されているすべての AccessibilityService 実装に配信しなければなりません。
  • オーディオ出力のない Android Watch デバイスでない限り、デバイス実装は、ユーザー補助サービスを有効または無効にするためのユーザーがアクセスできるメカニズムを提供しなければならず、android.provider.Settings.ACTION_ACCESSIBILITY_SETTINGS インテントに応答してこのインターフェイスを表示しなければなりません。

さらに、デバイス実装は、デバイス上でアクセシビリティ サービスの実装を提供する必要があり (SHOULD)、デバイスのセットアップ中にユーザーがアクセシビリティ サービスを有効にするメカニズムを提供する必要があります (SHOULD)。アクセシビリティ サービスのオープンソース実装は、Eyes Free プロジェクト [参考文献、44 ] から入手できます。

3.11。テキスト読み上げ

Android には、アプリケーションが Text-to-Speech (TTS) サービスを利用できるようにし、サービスプロバイダーが TTS サービスの実装を提供できるようにする API が含まれています [参考文献、45 ]。 android.hardware.audio.output 機能を報告するデバイス実装は、Android TTS フレームワークに関連するこれらの要件を満たさなければなりません。

デバイスの実装:

  • Android TTS フレームワーク API をサポートしなければならず、デバイスで利用可能な言語をサポートする TTS エンジンを含めるべきです(SHOULD)。アップストリームの Android オープンソース ソフトウェアには、フル機能の TTS エンジン実装が含まれていることに注意してください。
  • サードパーティの TTS エンジンのインストールをサポートしなければなりません
  • ユーザーがシステム レベルで使用する TTS エンジンを選択できるように、ユーザーがアクセスできるインターフェイスを提供しなければなりません

3.12. TV 入力フレームワーク

Android テレビ入力フレームワーク (TIF) は、Android テレビ デバイスへのライブ コンテンツの配信を簡素化します。 TIF は、Android テレビ デバイスを制御する入力モジュールを作成するための標準 API を提供します。 Android テレビデバイス実装は、テレビ入力フレームワークをサポートしなければなりません [参考文献、46 ]。

TIF をサポートするデバイス実装は、プラットフォーム機能 android.software.live_tv を宣言する必要があります。

4. アプリケーションパッケージの互換性

デバイス実装は、公式 Android SDK に含まれる「aapt」ツールによって生成された Android 「.apk」ファイルをインストールして実行しなければなりません [参考文献、47 ]。

デバイス実装は、.apk [参考資料, 48 ]、Android マニフェスト [参考資料, 49 ]、Dalvik バイトコード [参考資料, 20 ]、または RenderScript バイトコード形式のいずれかを、これらのファイルが正しくインストールされ実行されなくなるような方法で拡張してはなりません。その他の互換性のあるデバイス

5. マルチメディア互換性

5.1.メディアコーデック

デバイス実装は、このドキュメントで明示的に許可されている場合を除き、Android SDK ドキュメント [参考文献、50 ] で指定されているコア メディア形式をサポートしなければなりません (MUST)。具体的には、デバイス実装は、以下の表で定義されているメディア形式、エンコーダ、デコーダ、ファイルタイプ、およびコンテナ形式をサポートしなければなりません。これらのコーデックはすべて、Android オープン ソース プロジェクトの推奨 Android 実装のソフトウェア実装として提供されます。

Google も Open Handset Alliance も、これらのコーデックにサードパーティの特許がないことを表明していないことに注意してください。このソース コードをハードウェアまたはソフトウェア製品で使用する予定の場合は、オープン ソース ソフトウェアまたはシェアウェアを含むこのコードの実装には、関連する特許所有者からの特許ライセンスが必要になる場合があることに注意してください。

5.1.1.オーディオコーデック

フォーマット/コーデック

エンコーダ

デコーダ

詳細

サポートされているファイル タイプ/コンテナ形式

MPEG-4 AAC プロファイル

(AAC LC)

必須1

必須

8 ~ 48 kHz の標準サンプリング レートを備えたモノラル/ステレオ/5.0/5.12 コンテンツをサポートします。

• 3GPP (.3gp)

• MPEG-4 (.mp4、.m4a)

• ADTS raw AAC (.aac、Android 3.1 以降でデコード、Android 4.0 以降でエンコード、ADIF はサポートされていません)

• MPEG-TS (.ts、シーク不可、Android 3.0 以降)

MPEG-4 HE AAC プロファイル (AAC+)

必須1

(アンドロイド4.1以上)

必須

16 ~ 48 kHz の標準サンプリング レートのモノラル/ステレオ/5.0/5.12 コンテンツをサポートします。

MPEG-4 HE AACv2

プロファイル (拡張 AAC+)

必須

16 ~ 48 kHz の標準サンプリング レートのモノラル/ステレオ/5.0/5.12 コンテンツをサポートします。

AAC ELD (拡張低遅延 AAC)

必須1

(アンドロイド4.1以上)

必須

(アンドロイド4.1以上)

16 ~ 48 kHz の標準サンプリング レートのモノラル/ステレオ コンテンツをサポートします。

AMR-NB

必須3

必須3

4.75 ~ 12.2 kbps (8kHz でサンプリング)

3GPP (.3gp)

AMR-WB

必須3

必須3

6.60 kbit/s ~ 23.85 kbit/s の 9 レート (16kHz でサンプリング)

FLAC

必須

(Android 3.1以降)

モノラル/ステレオ (マルチチャンネルなし)。最大 48 kHz のサンプル レート (ただし、48 ~ 44.1 kHz のダウンサンプラーにはローパス フィルターが含まれていないため、44.1 kHz 出力のデバイスでは最大 44.1 kHz が推奨されます)。 16 ビットを推奨。 24 ビットにはディザは適用されません。

FLAC (.flac) のみ

MP3

必須

モノラル/ステレオ 8 ~ 320Kbps 固定 (CBR) または可変ビットレート (VBR)

MP3 (.mp3)

ミディ

必須

MIDI タイプ 0 および 1。DLS バージョン 1 および 2。XMF およびモバイル XMF。着信音形式 RTTTL/RTX、OTA、iMelody のサポート

• 0 と 1 を入力します (.mid、.xmf、.mxmf)。

• RTTTL/RTX (.rtttl、.rtx)

• OTA (.ota)

• iメロディ(.imy)

ヴォルビス

必須

• Ogg (.ogg)

• マトロスカ (.mkv、Android 4.0 以降)

PCM/ウェーブ

必須4

(アンドロイド4.1以上)

必須

16 ビット リニア PCM (レートはハードウェアの制限まで)。デバイスは、8000、11025、16000、および 44100 Hz の周波数での生の PCM 録音のサンプリング レートをサポートしなければなりません。

ウェーブ (.wav)

オーパス

必須

(Android 5.0以降)

マトロスカ (.mkv)

1 android.hardware.microphone を定義するデバイス実装には必須ですが、Android Watch デバイス実装にはオプションです。

2 5.0/5.1 コンテンツのダウンミックスのみが必要です。 2 つ以上のチャンネルの録画またはレンダリングはオプションです。

3 Android ハンドヘルド デバイスの実装に必要です。

4 Android Watch デバイス実装を含む、android.hardware.microphone を定義するデバイス実装に必要です。

5.1.2.画像コーデック

フォーマット/コーデック

エンコーダ

デコーダ

詳細

サポートされているファイル タイプ/コンテナ形式

JPEG

必須

必須

ベース+プログレッシブ

JPEG (.jpg)

GIF

必須

GIF (.gif)

PNG

必須

必須

PNG (.png)

BMP

必須

BMP (.bmp)

WebP

必須

必須

WebP (.webp)

5.1.3.ビデオコーデック

ビデオ コーデックは、Android Watch デバイスの実装ではオプションです。

フォーマット/コーデック

エンコーダ

デコーダ

詳細

サポートされているファイル タイプ/コンテナ形式

H.263

必須1

必須2

• 3GPP (.3gp)

• MPEG-4 (.mp4)

H.264 AVC

必須2

必須2

詳細については、セクション 5.2および5.3を参照してください。

• 3GPP (.3gp)

• MPEG-4 (.mp4)

• MPEG-TS (.ts、AAC オーディオのみ、シーク不可、Android 3.0 以降)

H.265 HEVC

必須2

詳細についてはセクション 5.3 を参照してください

MPEG-4 (.mp4)

MPEG-4 SP

必須2

3GPP (.3gp)

VP83

必須2

(アンドロイド4.3以上)

必須2

(Android 2.3.3以降)

詳細については、セクション 5.2および5.3を参照してください。

• WebM (.webm) [リソース、110 ]

• マトロスカ (.mkv、Android 4.0 以降)4

VP9

必須2

(アンドロイド4.4以上)

詳細については、セクション 5.3参照してください。

• WebM (.webm) [リソース、110 ]

• マトロスカ (.mkv、Android 4.0 以降)4

1 カメラ ハードウェアを含み、android.hardware.camera または android.hardware.camera.front を定義するデバイス実装に必要です。

2 Android Watch デバイスを除くデバイス実装に必要です。

3 Web ビデオ ストリーミングおよびビデオ会議サービスの品質を許容できるようにするには、デバイス実装では、[参考文献、51 ] の要件を満たすハードウェア VP8 コーデックを使用する必要があります (SHOULD)。

4 デバイス実装は、Matroska WebM ファイルの書き込みをサポートすべきです (SHOULD)。

5.2.ビデオエンコーディング

ビデオ コーデックは、Android Watch デバイスの実装ではオプションです。

H.264 コーデックをサポートする Android デバイス実装は、Baseline Profile Level 3 と次の SD (Standard Definition) ビデオ エンコーディング プロファイルをサポートしなければならず、Main Profile Level 4 と次の HD (High Definition) ビデオ エンコーディング プロファイルをサポートする必要があります (SHOULD)。 Android テレビ デバイスでは、HD 1080p ビデオを 30 fps でエンコードすることが強く推奨されます。

SD(低画質)

SD(高画質)

HD 720p1

HD 1080p1

ビデオ解像度

320×240ピクセル

720×480ピクセル

1280×720ピクセル

1920×1080ピクセル

ビデオフレームレート

20fps

30fps

30fps

30fps

ビデオのビットレート

384Kbps

2Mbps

4Mbps

10Mbps

1 ハードウェアでサポートされている場合、ただし Android テレビ デバイスでは強く推奨されます。

VP8 コーデックをサポートする Android デバイス実装は、SD ビデオ エンコード プロファイルをサポートしなければならず、次の HD (高解像度) ビデオ エンコード プロファイルをサポートする必要があります。

SD(低画質)

SD(高画質)

HD 720p1

HD 1080p1

ビデオ解像度

320×180ピクセル

640×360ピクセル

1280×720ピクセル

1920×1080ピクセル

ビデオフレームレート

30fps

30fps

30fps

30fps

ビデオのビットレート

800Kbps

2Mbps

4Mbps

10Mbps

1 ハードウェアでサポートされている場合。

5.3.ビデオのデコード

ビデオコーデックは、Android Watchデバイスの実装でオプションです。

デバイスの実装は、VP8、VP9、H.264、およびH.265コーデックの同じストリーム内での動的なビデオ解像度スイッチングをサポートする必要があります。

H.264デコーダーを使用したAndroidデバイスの実装は、ベースラインプロファイルレベル3と次のSDビデオデコードプロファイルをサポートする必要があり、HDデコードプロファイルをサポートする必要があります。 Androidテレビデバイスは、HD 1080Pデコードプロファイルを、注目を集めるレベル4.2をサポートする必要があります。

SD(低品質)

SD(高品質)

HD 720p1

HD 1080p1

ビデオ解像度

320 x 240 px

720 x 480 px

1280 x 720 px

1920 x 1080 px

ビデオフレームレート

30 fps

30 fps

30 fps / 60 fps2

30 fps / 60 fps2

ビデオビットレート

800 kbps

2 Mbps

8 Mbps

20 Mbps

1 Androidテレビデバイスの実装には必要ですが、ハードウェアでサポートされている場合にのみ、他のデバイスタイプに必要です。

2 Androidテレビデバイスの実装に必要です。

Androidデバイスの実装セクション5.1.3で説明されているVP8コーデックをサポートする場合、次のSDデコードプロファイルをサポートする必要があり、HDデコードプロファイルをサポートする必要があります。 Androidテレビデバイスは、HD 1080pデコードプロファイルをサポートする必要があります。

SD(低品質)

SD(高品質)

HD 720p1

HD 1080p1

ビデオ解像度

320 x 180 px

640 x 360 px

1280 x 720 px

1920 x 1080 px

ビデオフレームレート

30 fps

30 fps

30 fps / 60 fps2

30 /60 fps2

ビデオビットレート

800 kbps

2 Mbps

8 Mbps

20 Mbps

1 Androidテレビデバイスの実装には必要ですが、ハードウェアでサポートされている場合にのみ、他のタイプのデバイスに必要です。

2 Androidテレビデバイスの実装に必要です。

Androidデバイスの実装は、セクション5.1.3で説明されているVP9コーデックをサポートする場合、次のSDビデオデコードプロファイルをサポートする必要があり、HDデコードプロファイルをサポートする必要があります。 Androidテレビデバイスは、HD 1080pデコードプロファイルをサポートするために強くお勧めし、UHDデコードプロファイルをサポートする必要があります。 UHDビデオデコードプロファイルがサポートされている場合、8ビットの色深度をサポートする必要があります。

SD(低品質)

SD(高品質)

HD 720p 1

HD 1080p 2

UHD 2

ビデオ解像度

320 x 180 px

640 x 360 px

1280 x 720 px

1920 x 1080 px

3840 x 2160 px

ビデオフレームレート

30 fps

30 fps

30 fps

30 fps

30 fps

ビデオビットレート

600 kbps

1.6 Mbps

4 Mbps

10Mbps

20 Mbps

1 Androidテレビデバイスの実装には必要ですが、ハードウェアでサポートされている場合にのみ、他のタイプのデバイスに必要です。

2ハードウェアでサポートされている場合、Androidテレビデバイスの実装に強くお勧めします。

Androidデバイスの実装は、セクション5.1.3で説明されているH.265コーデックをサポートする場合、メインプロファイルレベル3のメイン層と次のSDビデオデコードプロファイルをサポートする必要があり、HDデコードプロファイルをサポートする必要があります。 Androidテレビデバイスは、メインプロファイルレベル4.1メイン層とHD 1080pデコードプロファイルをサポートする必要があり、Main10レベル5メインティアプロファイルとUHDデコードプロファイルをサポートする必要があります。

SD(低品質)

SD(高品質)

HD 720p 1

HD 1080p 1

UHD 2

ビデオ解像度

352 x 288 px

640 x 360 px

1280 x 720 px

1920 x 1080 px

3840 x 2160 px

ビデオフレームレート

30 fps

30 fps

30 fps

30 fps

30 fps

ビデオビットレート

600 kbps

1.6 Mbps

4 Mbps

10Mbps

20 Mbps

1 Androidテレビデバイスの実装には必要ですが、ハードウェアでサポートされている場合にのみ、他のタイプのデバイスに必要です。

2ハードウェアでサポートされている場合、Androidテレビデバイスの実装に必要です。

5.4.録音

このセクションで概説されている要件の一部は、Android 4.3以降であると述べられていますが、将来のバージョンの互換性の定義は、これらを必須に変更するために計画されています。既存のAndroidデバイスと新しいAndroidデバイスは、これらの要件を満たすことを非常に強く推奨しています。または、将来のバージョンにアップグレードしたときにAndroid互換性を達成することはできません。

5.4.1.未加工オーディオのキャプチャ

Android.hardware.microphoneを宣言するデバイスの実装では、次の特性を備えた生のオーディオコンテンツをキャプチャする必要があります。

  • 形式:線形PCM、16ビット
  • サンプリングレート:8000、11025、16000、44100
  • チャンネル:モノ

Android.hardware.microphoneを宣言するデバイスの実装では、次の特性を持つ生のオーディオコンテンツをキャプチャできるようにする必要があります。

  • 形式:線形PCM、16ビット
  • サンプリングレート:22050、48000
  • チャネル:ステレオ

5.4.2.音声認識用のキャプチャ

上記の記録仕様に加えて、Android.media.mediarecorder.audiosource.voice_recognition Audio Sourceを使用して、アプリケーションがオーディオストリームの録音を開始したとき:

  • デバイスは、周波数と周波数の特性に対してほぼ平坦な振幅を示す必要があります。具体的には、±3 dB、100 Hz〜4000 Hzです。
  • オーディオ入力感度は、1000 Hzの90 dBサウンドパワーレベル(SPL)ソースが16ビットサンプルで2500 RMSを生成するように設定する必要があります。
  • PCM 振幅レベルは、マイクでの 90 dB SPL に対して、-18 dB から +12 dB までの少なくとも 30 dB の範囲にわたる入力 SPL 変化を線形に追跡する必要があります。
  • 総高調波の歪みは、マイクで90 dB SPL入力レベルで1kHzで1%未満でなければなりません。
  • 存在する場合は、ノイズリダース処理を無効にする必要があります。
  • 自動ゲイン制御は、存在する場合は無効にする必要があります

プラットフォームが音声認識のために調整されたノイズ抑制技術をサポートする場合、効果はAndroid.media.audiofx.noisesuppressor APIから制御可能でなければなりません。さらに、ノイズサプレッサーの効果記述子のUUIDフィールドは、ノイズ抑制技術の各実装を一意に識別する必要があります。

5.4.3.再生の再ルーティングのためのキャプチャ

Android.media.mediarecorder.audiosourceクラスには、remote_submixオーディオソースが含まれています。 Android.hardware.audio.outputを宣言するデバイスは、remote_submixオーディオソースを適切に実装する必要があります。これにより、アプリケーションがAndroid.media.audiorecord APIを使用してこのオーディオソースから録音した場合、次のすべてのオーディオストリームのミックスをキャプチャできます。 :

  • Stream_ring
  • stream_alarm
  • stream_notification

5.5.オーディオの再生

Android.hardware.audio.outputを宣言するデバイスの実装は、このセクションの要件に準拠する必要があります。

5.5.1.未加工オーディオの再生

デバイスは、次の特性を使用して、生のオーディオコンテンツの再生を許可する必要があります。

  • 形式:線形PCM、16ビット
  • サンプリングレート:8000、11025、16000、22050、32000、44100
  • チャンネル:モノ、ステレオ

デバイスは、次の特性を使用して、生のオーディオコンテンツの再生を許可する必要があります。

  • サンプリングレート:24000、48000

5.5.2.オーディオエフェクト

Androidは、デバイスの実装のためにオーディオ効果のAPIを提供します[リソース、52 ]。機能を宣言するデバイスの実装android.hardware.audio.output:

  • effect_type_equalizer and Effect_type_loudness_enhancerの実装をサポートする必要があります。
  • Visualizerクラスを通じて制御可能なVisualizerAPI実装をサポートする必要があります
  • effect_type_bass_boost、effect_type_env_reverb、effect_type_preset_reverb、およびeffect_type_virtualizerの実装をAudioeffect sub-classes Bassboost、Environmentalreverb、presetreverb、およびVirtualizerをサポートする必要があります。

5.5.3.音声出力音量

Androidテレビデバイスの実装には、システムマスターボリュームおよびデジタルオーディオ出力のボリューム減衰のサポートが含まれている必要があります。

5.6.オーディオ遅延

オーディオレイテンシーは、オーディオ信号がシステムを通過するための時間遅延です。アプリケーションの多くのクラスは、リアルタイムのサウンドエフェクトを実現するために、短いレイテンシーに依存しています。

このセクションの目的のために、次の定義を使用してください。

  • 出力レイテンシ- アプリケーションがPCMコードデータのフレームを書き込む場合と、対応するサウンドが外部リスナーによって聞こえるか、トランスデューサーによって観察されるときの間隔。
  • コールド出力レイテンシ- オーディオ出力システムがリクエストの前にアイドル状態になり、電源が入った最初のフレームの出力レイテンシ。
  • 連続出力レイテンシ- デバイスがオーディオを再生した後の後続のフレームの出力レイテンシ。
  • 入力レイテンシ- 外部サウンドがデバイスに表示されたときと、アプリケーションがPCMコードデータの対応するフレームを読み取るときの間隔。
  • コールド入力レイテンシ- リクエストの前にオーディオ入力システムがアイドル状態になり、電源が入っていた最初のフレームの入力時間の失われた合計と入力レイテンシ。
  • 連続入力遅延- デバイスがオーディオをキャプチャしている間、後続のフレームの入力レイテンシ。
  • コールド出力ジッター- コールド出力レイテンシ値の個別の測定値間のばらつき。
  • コールド入力ジッター- コールド入力レイテンシ値の個別の測定値間のばらつき。
  • 連続した往復遅延- 連続入力レイテンシと連続出力レイテンシと5ミリ秒の合計。
  • OpenSl ES PCMバッファーキューAPI - Android NDK内のPCM関連のOpenSl ES APIのセット。 ndk_root/docs/opensles/index.htmlを参照してください。

android.hardware.audio.outputを宣言するデバイスの実装は、これらのオーディオ出力要件を満たすか、それを超える必要があります。

  • コールド出力レイテンシは 100 ミリ秒以下
  • 連続出力遅延は 45 ミリ秒以下
  • コールド出力ジッターを最小限に抑えます

OpenSl ES PCMバッファーキューAPIを使用する際の初期キャリブレーション後、デバイスの実装がこのセクションの要件を満たしている場合、少なくとも1つのサポートされているオーディオ出力デバイスにわたって連続出力レイテンシとコールド出力レイテンシのために、低遅延オーディオのサポートを報告する場合があります、Android.content.pm.packagemanagerクラス[ Resources、53 ]を介してAndroid.hardware.audio.low_latency機能を報告します。逆に、デバイスの実装がこれらの要件を満たしていない場合、低遅延のオーディオのサポートを報告してはなりません。

android.hardware.microphoneを含むデバイスの実装は、これらの入力オーディオ要件を満たす必要があります。

  • コールド入力レイテンシは 100 ミリ秒以下
  • 30ミリ秒以下の連続入力遅延
  • 50ミリ秒以下の連続した往復遅延
  • コールド入力ジッターを最小限に抑えます

5.7.ネットワークプロトコル

デバイスは、Android SDKドキュメント[リソース、50 ]で指定されているように、オーディオおよびビデオ再生のためにメディアネットワークプロトコルをサポートする必要があります。具体的には、デバイスは次のメディアネットワークプロトコルをサポートする必要があります。

  • RTSP(RTP、SDP)
  • HTTP(S)プログレッシブストリーミング
  • HTTP(s)ライブストリーミングドラフトプロトコル、バージョン3 [リソース、54 ]

5.8.セキュアメディア

安全なビデオ出力をサポートし、安全な表面をサポートできるデバイスの実装は、display.flag_secureのサポートを宣言する必要があります。 Display.Flag_Secureのサポートを宣言するデバイスの実装は、ワイヤレスディスプレイプロトコルをサポートする場合、Miracast Wireless DisplayのHDCP 2.x以降などの暗号的に強力なメカニズムでリンクを保護する必要があります。同様に、有線外部ディスプレイをサポートする場合、デバイスの実装はHDCP 1.2以上をサポートする必要があります。 Androidテレビデバイスの実装は、低解像度のために4K解像度とHDCP 1.4以上をサポートするデバイスのHDCP 2.2をサポートする必要があります。上流のAndroidオープンソースの実装には、この要件を満たすワイヤレス(Miracast)およびWired(HDMI)ディスプレイのサポートが含まれます。

6. 開発者ツールとオプションの互換性

6.1.開発者ツール

デバイス実装は、Android SDK で提供される Android 開発者ツールをサポートしなければなりません。 Android互換性のあるデバイスは、次のことと互換性がなければなりません。

デバイスの実装は、Dumpsys [リソース、56 ]を含むAndroid SDKで文書化されているように、すべてのADB機能をサポートする必要があります。デバイス側のADBデーモンはデフォルトでは非アクティブでなければならず、Androidデバッグブリッジをオンにするためのユーザーアクセス可能なメカニズムが必要です。デバイスの実装がUSB周辺モードを省略している場合、ローカルエリアネットワーク(イーサネットや802.11など)を介してAndroidデバッグブリッジを実装する必要があります。

Androidには、安全なADBのサポートが含まれています。 Secure ADBは、既知の認証されたホストでADBを有効にします。デバイスの実装は、安全なADBをサポートする必要があります。

デバイス実装は、Android SDK に記載されているすべての ddms 機能をサポートしなければなりません。 DDMSはADBを使用するため、DDMSのサポートはデフォルトでは非アクティブである必要がありますが、ユーザーがAndroid Debug Bridgeを上記のようにアクティブ化した場合はいつでもサポートする必要があります。

デバイス実装には、Monkey フレームワークが含まれており、アプリケーションで使用できるようにする必要があります。

Android SDKに記載されているように、デバイスの実装はSystraceツールをサポートする必要があります。 Systraceはデフォルトでは非アクティブでなければならず、Systraceをオンにするにはユーザーにアクセス可能なメカニズムが必要です。

ほとんどのLinuxベースのシステムとApple Macintoshシステムは、追加のサポートなしで標準のAndroid SDKツールを使用してAndroidデバイスを認識しています。ただし、Microsoft Windowsシステムには通常、新しいAndroidデバイスのドライバーが必要です。 (たとえば、新しいベンダーIDや新しいデバイスIDには、Windowsシステム用のカスタムUSBドライバーが必要です。)デバイスの実装が標準のAndroid SDKで提供されているADBツールによって認識されていない場合、デバイスの実装者は開発者が接続できるようにするWindowsドライバーを提供する必要があります。 ADBプロトコルを使用したデバイス。これらのドライバーは、32ビットと64ビットの両方のバージョンで、Windows XP、Windows Vista、Windows 7、Windows 8、およびWindows 9に提供する必要があります。

6.2.開発者向けオプション

Androidには、アプリケーション開発関連の設定を構成するための開発者のサポートが含まれています。デバイスの実装は Android.settings.application_development_settingsを尊重する必要があります。上流のAndroid実装は、デフォルトで開発者オプションメニューを隠し、ユーザーが設定> About Device > Build Numberメニュー項目で7回を押した後、開発者オプションを起動できるようにします。デバイスの実装は、開発者オプションに一貫したエクスペリエンスを提供する必要があります。具体的には、デバイスの実装はデフォルトで開発者のオプションを非表示にする必要があり、上流のAndroid実装と一致する開発者オプションを有効にするメカニズムを提供する必要があります。

7. ハードウェアの互換性

デバイスにサードパーティ開発者に対応するAPIを備えた特定のハードウェアコンポーネントが含まれている場合、デバイスの実装は、Android SDKドキュメントで説明されているようにそのAPIを実装する必要があります。 SDK の API がオプションとして指定されているハードウェア コンポーネントと対話し、デバイス実装がそのコンポーネントを所有していない場合:

  • コンポーネントのAPIの完全なクラス定義(SDKによって文書化されている)も提示する必要があります。
  • APIの動作は、何らかの合理的な方法でNo-Opsとして実装する必要があります。
  • APIメソッドは、SDKドキュメントで許可されている場合にnull値を返す必要があります。
  • APIメソッドは、SDKドキュメントでヌル値が許可されていないクラスのNO-OP実装を返す必要があります。
  • APIメソッドは、SDKドキュメントで文書化されていない例外をスローしてはなりません。

これらの要件が適用されるシナリオの典型的な例はテレフォニー API です。電話以外のデバイスであっても、これらの API は合理的な no-ops として実装される必要があります。

デバイスの実装は、同じビルドフィンガープリントについて、android.content.pm.packagemanagerクラスのgetsystemavailablefeatures()およびhassystemfeature(string)メソッドを介して正確なハードウェア構成情報を一貫して報告する必要があります。 [リソース、53]

7.1.ディスプレイとグラフィックス

Androidには、デバイスに適切にアプリケーションアセットとUIレイアウトを自動的に調整する機能が含まれており、さまざまなハードウェア構成[リソース、61 ]でサードパーティのアプリケーションが適切に実行されるようにします。このセクションで詳述されているように、デバイスはこれらのAPIと動作を適切に実装する必要があります。

このセクションの要件で参照される単位は、次のように定義されています。

  • 物理的な斜めのサイズ- ディスプレイの照らされた部分の2つの反対の角の間のインチの距離。
  • ドットあたりのドット(DPI) - 1 "の線形水平または垂直スパンで包まれるピクセル数。DPI値がリストされている場合、水平DPIと垂直DPIの両方が範囲内に収まる必要があります。
  • アスペクト比- 画面の長い寸法の比率と短い寸法。たとえば、480x854ピクセルの表示は854 /480 = 1.779、またはほぼ「16:9」です。
  • 密度非依存ピクセル(DP) - 160 dpiスクリーンに正規化された仮想ピクセルユニット、Pixels = DPS *(密度 / 160)として計算されました。

7.1.1.画面構成

7.1.1.1.画面サイズ

Android Watchデバイス(セクション2で詳細)には、このセクションで説明されているように、画面サイズが小さくなる場合があります。

Android UIフレームワークは、さまざまな画面サイズをサポートしており、Android.content.res.res.configuration.screenlayout経由で、アプリケーションがスクリーンlayout_size_maskを使用してデバイス画面サイズ(「画面レイアウト」)をクエリできるようにします。デバイスの実装は、Android SDKドキュメント[リソース、61 ]で定義され、上流のAndroidプラットフォームによって決定された正しい画面サイズを報告する必要があります。具体的には、デバイスの実装は、次の論理密度非依存ピクセル(DP)画面寸法に従って正しい画面サイズを報告する必要があります。

  • デバイスは、Android Watchデバイスでない限り、少なくとも426 dp x 320 dp( 'Small')の画面サイズを備えている必要があります。
  • 画面サイズの「通常」を報告するデバイスには、少なくとも480 dp x 320 dpの画面サイズが必要です。
  • 画面サイズの「大規模」を報告するデバイスには、少なくとも640 dp x 480 dpの画面サイズが必要です。
  • 画面サイズの「Xlarge」を報告するデバイスには、少なくとも960 dp x 720 dpの画面サイズが必要です。

加えて、

  • Android Watchデバイスには、1.1〜2.5インチの範囲の物理的斜めのサイズの画面が必要です
  • 物理的に統合された画面を備えた他のタイプのAndroidデバイスの実装には、物理​​的な斜めのサイズに少なくとも2.5インチの画面が必要です。

デバイスは、報告された画面サイズをいつでも変更してはなりません。

アプリケーションはオプションで、彼らがサポートする画面サイズを示していますAndroidManifest.xmlファイルの属性。 Android SDKドキュメントで説明されているように、デバイスの実装は、小規模、通常、大、Xlarge画面に対する適切なサポートを正しく称えなければなりません。

7.1.1.2.画面のアスペクト比

Android Watchデバイスのアスペクト比は1.0(1:1)です。

画面のアスペクト比は1.3333(4:3)から1.86(約16:9)から1.86(約16:9)でなければなりませんが、Android Watchデバイスのアスペクト比は1.0(1:1)である場合があります。 android.content.res.configuration.uimode。

7.1.1.3.画面密度

Android UIフレームワークは、アプリケーション開発者がアプリケーションリソースをターゲットにするのに役立つ標準の論理密度のセットを定義します。デバイスの実装は、Android.util.displaymetrics APIを介して次の論理Androidフレームワーク密度の1つのみを報告する必要があり、この標準密度でアプリケーションを実行する必要があり、デフォルトのディスプレイの場合はいつでも値を変更してはなりません。

  • 120 DPI(LDPI)
  • 160 DPI(MDPI)
  • 213 DPI(TVDPI)
  • 240 DPI(HDPI)
  • 320 dpi(xhdpi)
  • 400 dpi(400dpi)
  • 480 dpi(xxhdpi)
  • 560 dpi(560dpi)
  • 640 dpi(xxxhdpi)

デバイスの実装は、論理密度が報告された画面サイズを最小限のサポートされている画面サイズをプッシュしない限り、画面の物理密度に最も近い標準のAndroidフレームワーク密度を定義する必要があります。物理密度に最も近い標準のAndroidフレームワーク密度が、サポートされている互換性のある画面サイズ(320 dp幅)よりも小さい画面サイズになる場合、デバイスの実装は次の標準Androidフレームワーク密度を報告する必要があります。

7.1.2.メトリクスの表示

デバイスの実装は、android.util.displaymetrics [リソース、62 ]で定義されているすべてのディスプレイメトリックの正しい値を報告する必要があり、埋め込みまたは外部画面がデフォルトの表示として使用されるかどうかに関係なく、同じ値を報告する必要があります。

7.1.3.画面の向き

デバイスは、サポートする画面向けの方向(Android.hardware.screen.portraitおよび/またはandroid.hardware.screen.landscape)を報告し、少なくとも1つのサポートされた方向を報告する必要があります。たとえば、テレビやラップトップなどの固定オリエンテーションランドスケープ画面を備えたデバイスは、android.hardware.screen.landscapeのみを報告する必要があります。

両方の画面の向きを報告するデバイスは、ポートレートまたはランドスケープスクリーンの向きのいずれかへのアプリケーションによって動的方向をサポートする必要があります。つまり、デバイスは、特定の画面の向きに対するアプリケーションの要求を尊重する必要があります。デバイス実装は、デフォルトとして縦向きまたは横向きのいずれかを選択してもよい(MAY)。

デバイスは、android.content.res.Configuration.orientation、android.view.Display.getOrientation()、またはその他の API を介してクエリされるたびに、デバイスの現在の向きの正しい値を報告しなければなりません。

デバイスは、方向を変更するときに報告された画面サイズまたは密度を変更してはなりません。

7.1.4. 2D および 3D グラフィックスの高速化

Android SDKドキュメントで具体化および詳細に記載されているように、デバイスの実装はOpenGL ES 1.0と2.0の両方をサポートする必要があります。デバイスの実装は、それをサポートできるデバイスでOpenGL ES 3.0または3.1をサポートする必要があります。 Android SDKドキュメント[ Resources、63 ]で詳述されているように、デバイスの実装もAndroid RenderScriptをサポートする必要があります。

また、デバイスの実装は、OpenGL ES 1.0、OpenGL ES 2.0、OpenGL ES 3.0、またはOpenGL 3.1をサポートするものとして自分自身を正しく識別する必要があります。あれは:

  • マネージドAPI(via via the Gles10.getString()メソッドは、OpenGL ES 1.0およびOpenGL ES 2.0のサポートを報告する必要があります。
  • ネイティブC/C ++ OpenGL API(libgles_v1cm.so、libgles_v2.so、またはlibegl.soを介してアプリが使用できるAPI)は、OpenGL ES 1.0およびOpenGL ES 2.0のサポートを報告する必要があります。
  • OpenGL ES 3.0または3.1のサポートを宣言するデバイスの実装は、対応するマネージドAPIをサポートし、ネイティブC/C ++ APIのサポートを含める必要があります。 OpenGL ES 3.0または3.1のサポートを宣言するデバイスの実装では、libglesv2.soは、OpenGL ES 2.0関数シンボルに加えて、対応する関数シンボルをエクスポートする必要があります。

OpenGL ES 3.1に加えて、AndroidはJavaインターフェイス[リソース、64 ]を備えた拡張機能パックと、テッセレーションやASTCテクスチャ圧縮形式などの高度なグラフィック機能のネイティブサポートを提供します。 Androidデバイスの実装は、この拡張機能パックをサポートし、完全に実装されている場合は、android.hardware.opengles.aep機能フラグを介してサポートを識別することができます。

また、デバイスの実装では、希望するOpenGL ES拡張機能を実装する場合があります。ただし、デバイスの実装は、OpenGL ESマネージドおよびネイティブAPIを介してサポートするすべての拡張文字列を介して報告する必要があり、逆にサポートしていない拡張文字列を報告してはなりません。

Androidには、特定のOpenGLテクスチャ圧縮形式が必要であることをオプションで指定するためのアプリケーションのサポートが含まれていることに注意してください。これらの形式は通常、ベンダー固有のものです。 Androidは、特定のテクスチャ圧縮形式を実装するためにAndroidがデバイスの実装を必要としません。ただし、OpenGL APIのGetString()メソッドを介して、サポートするテクスチャ圧縮形式を正確に報告する必要があります。

Androidには、マニフェストタグAndroid:HardwareAceleratedまたはDirect API Call [ Resources、65 ]を使用して、アプリケーション、アクティビティ、ウィンドウ、またはビューレベルでハードウェアアクセラレーションを有効にすることを宣言するアプリケーションのメカニズムが含まれています。

デバイスの実装は、デフォルトでハードウェアアクセラレーションを有効にする必要があり、開発者がAndroid:HardwareCcelerated = "FALSE"を設定することで開発者がリクエストする場合、ハードウェアアクセラレーションを無効にする必要があります。

さらに、デバイスの実装は、ハードウェアアクセラレーションに関するAndroid SDKドキュメントと一致する動作を示す必要があります[リソース、65 ]。

Androidには、開発者がUI階層のレンダリングターゲットとしてハードウェアアクセラレーションのOpenGL ESテクスチャを直接統合できるTextureViewオブジェクトが含まれています。デバイスの実装は、TextureView APIをサポートする必要があり、上流のAndroid実装で一貫した動作を示す必要があります。

Androidには、EGLCONFIGがビデオに画像を記録するAnativeWindowへのレンダリングをサポートするかどうかを示すEGLCONFIG属性であるEGL_Android_Recordableのサポートが含まれています。デバイスの実装は、egl_android_recordable拡張機能[リソース、66 ]をサポートする必要があります。

7.1.5.レガシーアプリケーション互換モード

Androidは、スクリーンサイズの独立性以前のAndroidの古いバージョン用に開発されていないレガシーアプリケーションの利益のために、フレームワークが「通常の」画面サイズの等価(320dp幅)モードで動作する「互換性モード」を指定します。デバイスの実装には、上流のAndroidオープンソースコードによって実装されたレガシーアプリケーション互換モードのサポートを含める必要があります。つまり、デバイスの実装は、互換モードがアクティブになっているトリガーまたはしきい値を変更してはならず、互換モード自体の動作を変更してはなりません。

7.1.6.スクリーンテクノロジー

Androidプラットフォームには、アプリケーションがリッチグラフィックスをディスプレイにレンダリングできるAPIが含まれています。デバイスは、このドキュメントで特別に許可されていない限り、Android SDKによって定義されるように、これらすべてのAPIをサポートする必要があります。

  • デバイスは、16ビットカラーグラフィックをレンダリングできるディスプレイをサポートする必要があり、24ビットカラーグラフィックスが可能なディスプレイをサポートする必要があります。
  • デバイスは、アニメーションをレンダリングできるディスプレイをサポートする必要があります。
  • 使用されるディスプレイテクノロジーには、0.9〜1.15のピクセルアスペクト比(PAR)が必要です。つまり、ピクセルのアスペクト比は、10〜15%の許容範囲で正方形(1.0)近くでなければなりません。

7.1.7.外部ディスプレイ

Androidには、メディア共有機能と外部ディスプレイにアクセスするための開発者APIを可能にするためのセカンダリディスプレイのサポートが含まれています。デバイスが有線、ワイヤレス、または組み込みの追加のディスプレイ接続を介して外部ディスプレイをサポートする場合、Android SDKドキュメント[リソース、67 ]で説明されているように、デバイスの実装はディスプレイマネージャーAPIを実装する必要があります。

7.2.入力デバイス

7.2.1.キーボード

Android Watchデバイスは、他のタイプのデバイスの実装がソフトキーボードを実装する必要があります。

デバイスの実装:

  • http://developer.android.comで詳細に記載されているように、入力管理フレームワーク(サードパーティの開発者が入力メソッドエディター、IEソフトキーボードを作成できるようにする)のサポートを含める必要があります。
  • 画面のサイズがソフトキーボードを持つことを妥当ではないAndroid Watchデバイスを除き、少なくとも1つのソフトキーボードの実装を提供する必要があります(ハードキーボードが存在するかどうかに関係なく)
  • 追加のソフト キーボード実装が含まれる場合があります
  • ハードウェア キーボードが含まれる場合があります
  • android.content.res.configuration.keyboard [リソース、68 ](qwertyまたは12-key)で指定された形式の1つと一致しないハードウェアキーボードを含めないでください

7.2.2.非タッチナビゲーション

AndroidテレビデバイスはD-Padをサポートする必要があります。

デバイスの実装:

  • デバイスの実装がAndroidテレビデバイスではない場合は、タッチナビゲーションオプション(トラックボール、D-PAD、またはホイール)を省略できます
  • android.content.res.configuration.navigationの正しい値を報告する必要があります[リソース、68 ]
  • 入力管理エンジンと互換性のあるテキストの選択と編集のための合理的な代替ユーザーインターフェイスメカニズムを提供する必要があります。上流のAndroidオープンソースの実装には、タッチナビゲーションの入力がないデバイスでの使用に適した選択メカニズムが含まれています。

7.2.3.ナビゲーションキー

このセクションで説明されているように、家庭、露出、および背面関数の可視性と可視性の要件は、デバイスの種類間で異なります。

ホーム、露出、および背面関数(キーイベントKeyCode_home、KeyCode_App_Switch、KeyCode_backにそれぞれマッピング)は、Androidナビゲーションパラダイムにとって不可欠であるため、

  • Androidハンドヘルドデバイスの実装は、家庭、露出、バック機能を提供する必要があります。
  • Androidテレビデバイスの実装は、ホームおよびバック機能を提供する必要があります。
  • Android Watchデバイスの実装では、ユーザーがホーム機能を使用できる必要があります。UI_MODE_TYPE_WATCHである場合を除き、バック機能を備えている必要があります。
  • 他のすべてのタイプのデバイス実装は、ホームおよびバック機能を提供する必要があります。

これらの関数は、専用の物理ボタン(機械的または静電容量のタッチボタンなど)を介して実装されたり、画面の明確な部分、ジェスチャー、タッチパネルなどに専用ソフトウェアキーを使用して実装できます。Androidは両方の実装をサポートします。これらの機能はすべて、表示されている場合は、単一のアクション(TAP、ダブルクリック、またはジェスチャーなど)でアクセスできる必要があります。

リコン機能は、提供されている場合は、フルスクリーンモードで他のナビゲーション関数と一緒に隠さない限り、可視ボタンまたはアイコンを持たなければなりません。これは、ナビゲーション用の物理ボタンを備えた以前のAndroidバージョンからアップグレードするデバイスには適用されません。

ホームおよびバック機能は、提供されている場合は、フルスクリーンモードで他のナビゲーション関数と一緒に隠されていない限り、またはUIMODE UI_MODE_TYPE_MASKがUI_MODE_TYPE_WATCHに設定されている場合、それぞれ目に見えるボタンまたはアイコンを持たなければなりません。

メニュー関数は、Android 4.0以降、アクションバーを支持して非推奨されています。したがって、Android 5.0を使用した新しいデバイス実装の配送は、メニュー機能に専用の物理ボタンを実装してはなりません。古いデバイスの実装は、メニュー関数に専用の物理ボタンを実装する必要はありませんが、物理メニューボタンが実装されており、デバイスがターゲットSdkversion> 10を使用してアプリケーションを実行している場合、デバイスの実装は次のとおりです。

  • アクションバーにアクションオーバーフローボタンを表示する必要があり、結果として得られるアクションオーバーフローメニューポップアップが空になっていないときに表示する必要があります。 Android 4.4の前に起動したデバイスの実装では、Android 5.0にアップグレードする場合は、これをお勧めします。
  • アクションバーのオーバーフローボタンを選択して表示されるアクションオーバーフローポップアップの位置を変更しないでください
  • アクションオーバーフローポップアップを画面上の変更された位置でレンダリングする場合があります。

逆方向の互換性のために、デバイスの実装は、TargetSdkversion <= 10の場合、物理ボタン、ソフトウェアキー、またはジェスチャーのいずれかで、アプリケーションでメニュー機能を使用できるようにする必要があります。このメニュー関数は、他のナビゲーション関数と一緒に隠さない限り提示する必要があります。

AndroidはASSISTアクション[リソース、69 ]をサポートしています。 Androidデバイスの実装Android Watchデバイスを除き、アプリケーションを実行するときは常にユーザーがアシストアクションを利用できるようにする必要があります。アシストアクションは、ホームボタンのロングプレスまたはソフトウェアホームキーのスワイプアップジェスチャーとして実装する必要があります。この関数は、別の物理ボタン、ソフトウェアキー、またはジェスチャーを介して実装できますが、他のナビゲーションキーが表示されている場合は、単一のアクション(TAP、ダブルクリック、またはジェスチャー)でアクセスできる必要があります。

デバイスの実装では、画面の明確な部分を使用してナビゲーションキーを表示する場合がありますが、もしそうなら、これらの要件を満たす必要があります。

  • デバイスの実装ナビゲーションキーは、画面の異なる部分を使用している必要があり、アプリケーションでは利用できず、アプリケーションで利用可能な画面の部分を不明瞭にしたり、干渉したりしてはなりません。
  • デバイスの実装は、セクション7.1.1で定義されている要件を満たすアプリケーションにディスプレイの一部を利用可能にする必要があります。
  • アプリケーションがシステムUIモードを指定しない場合、デバイスの実装はナビゲーションキーを表示するか、System_ui_flag_visibleを指定する必要があります。
  • デバイスの実装は、アプリケーションがSystem_UI_FLAG_LOW_PROFILEを指定するときに、目立たない「ロープロファイル」(例えば薄暗い)モードでナビゲーションキーを提示する必要があります。
  • アプリケーションがSystem_ui_flag_hide_navigationを指定するとき、デバイスの実装はナビゲーションキーを非表示にする必要があります。

7.2.4.タッチスクリーン入力

Androidハンドヘルドとウォッチデバイスは、タッチスクリーン入力をサポートする必要があります。

デバイスの実装には、何らかの種類のポインター入力システム(マウスのようなものまたはタッチ)が必要です。ただし、デバイスの実装がポインター入力システムをサポートしていない場合、Android.hardware.touchScreenまたはandroid.hardware.faketouch機能定数を報告しないでください。ポインター入力システムを含むデバイスの実装:

  • デバイス入力システムが複数のポインターをサポートする場合、完全に独立して追跡されたポインターをサポートする必要があります
  • Android.content.res.configuration.touchScreen [リソース、68 ]の値を、デバイス上の特定のタッチスクリーンのタイプに報告する必要があります

Androidには、さまざまなタッチスクリーン、タッチパッド、偽のタッチ入力デバイスのサポートが含まれています。タッチスクリーンベースのデバイスの実装は、ユーザーが画面上でアイテムを直接操作する印象を持つように、ディスプレイ[リソース、70 ]に関連付けられています。ユーザーは画面に直接触れているため、システムはオブジェクトが操作されていることを示すために追加のアフォーダンスを必要としません。対照的に、偽のタッチインターフェイスは、タッチスクリーン機能のサブセットを近似するユーザー入力システムを提供します。たとえば、画面上のカーソルを駆動するマウスまたはリモートコントロールはタッチに近似しますが、ユーザーは最初のポイントまたはフォーカスをクリックする必要があります。マウス、トラックパッド、ジャイロベースのエアマウス、ジャイロポインター、ジョイスティック、マルチタッチトラックパッドなどの多数の入力デバイスは、偽のタッチ相互作用をサポートできます。 Android 5.0には、機能Constant Android.hardware.faketouchが含まれています。これは、タッチベースの入力(基本的なジェスチャーサポートを含む)を適切にエミュレートできるマウスやトラックパッドなどの高忠実度のない(ポインターベース)入力デバイスに対応しています。 and indicates that the device supports an emulated subset of touchscreen functionality. Device implementations that declare the fake touch feature MUST meet the fake touch requirements in section 7.2.5 .

Device implementations MUST report the correct feature corresponding to the type of input used. Device implementations that include a touchscreen (single-touch or better) MUST report the platform feature constant android.hardware.touchscreen. Device implementations that report the platform feature constant android.hardware.touchscreen MUST also report the platform feature constant android.hardware.faketouch. Device implementations that do not include a touchscreen (and rely on a pointer device only) MUST NOT report any touchscreen feature, and MUST report only android.hardware.faketouch if they meet the fake touch requirements in section 7.2.5 .

7.2.5.フェイクタッチ入力

Device implementations that declare support for android.hardware.faketouch:

  • MUST report the absolute X and Y screen positions of the pointer location and display a visual pointer on the screen [ Resources, 71 ]
  • MUST report touch event with the action code that specifies the state change that occurs on the pointer going down or up on the screen [ Resources, 71 ]
  • MUST support pointer down and up on an object on the screen, which allows users to emulate tap on an object on the screen
  • MUST support pointer down, pointer up, pointer down then pointer up in the same place on an object on the screen within a time threshold, which allows users to emulate double tap on an object on the screen [ Resources, 71 ]
  • MUST support pointer down on an arbitrary point on the screen, pointer move to any other arbitrary point on the screen, followed by a pointer up, which allows users to emulate a touch drag
  • MUST support pointer down then allow users to quickly move the object to a different position on the screen and then pointer up on the screen, which allows users to fling an object on the screen

Devices that declare support for android.hardware.faketouch.multitouch.distinct MUST meet the requirements for faketouch above, and MUST also support distinct tracking of two or more independent pointer inputs.

7.2.6.ゲームコントローラーのサポート

Android Television device implementations MUST support button mappings for game controllers as listed below. The upstream Android implementation includes implementation for game controllers that satisfies this requirement.

7.2.6.1.ボタンのマッピング

Android Television device implementations MUST support the following key mappings:

ボタン

HID Usage 2

Android Button

A1

0x09 0x0001

KEYCODE_BUTTON_A (96)

B1

0x09 0x0002

KEYCODE_BUTTON_B (97)

× 1

0x09 0x0004

KEYCODE_BUTTON_X (99)

Y1

0x09 0x0005

KEYCODE_BUTTON_Y (100)

D-pad up 1

D-pad down 1

0x01 0x00393

AXIS_HAT_Y 4

D-pad left 1

D-pad right 1

0x01 0x00393

AXIS_HAT_X4

Left shoulder button 1

0x09 0x0007

KEYCODE_BUTTON_L1 (102)

Right shoulder button 1

0x09 0x0008

KEYCODE_BUTTON_R1 (103)

Left stick click 1

0x09 0x000E

KEYCODE_BUTTON_THUMBL (106)

Right stick click 1

0x09 0x000F

KEYCODE_BUTTON_THUMBR (107)

ホーム1

0x0c 0x0223

KEYCODE_HOME (3)

戻る1

0x0c 0x0224

KEYCODE_BACK (4)

1 [ Resources, 72 ]

2 The above HID usages must be declared within a Game pad CA (0x01 0x0005).

3 This usage must have a Logical Minimum of 0, a Logical Maximum of 7, a Physical Minimum of 0, a Physical Maximum of 315, Units in Degrees, and a Report Size of 4. The logical value is defined to be the clockwise rotation away from the vertical axis; for example, a logical value of 0 represents no rotation and the up button being pressed, while a logical value of 1 represents a rotation of 45 degrees and both the up and left keys being pressed.

4 [ Resources, 71 ]

Analog Controls 1

HID Usage

Android Button

Left Trigger

0x02 0x00C5

AXIS_LTRIGGER

Right Trigger

0x02 0x00C4

AXIS_RTRIGGER

Left Joystick

0x01 0x0030

0x01 0x0031

AXIS_X

AXIS_Y

Right Joystick

0x01 0x0032

0x01 0x0035

AXIS_Z

AXIS_RZ

1 [ Resources, 71 ]

7.2.7.リモコン

Android Television device implementations SHOULD provide a remote control to allow users to access the TV interface. The remote control MAY be a physical remote or can be a software-based remote that is accessible from a mobile phone or tablet. The remote control MUST meet the requirements defined below.

  • Search affordance —Device implementations MUST fire KEYCODE_SEARCH when the user invokes voice search either on the physical or software-based remote.
  • Navigation —All Android Television remotes MUST include Back, Home, and Select buttons and support for D-pad events [ Resources, 72 ].

7.3.センサー

Android includes APIs for accessing a variety of sensor types. Devices implementations generally MAY omit these sensors, as provided for in the following subsections. If a device includes a particular sensor type that has a corresponding API for third-party developers, the device implementation MUST implement that API as described in the Android SDK documentation and the Android Open Source documentation on sensors [ Resources, 73 ]. For example, device implementations:

  • MUST accurately report the presence or absence of sensors per the android.content.pm.PackageManager class [ Resources, 53]
  • MUST return an accurate list of supported sensors via the SensorManager.getSensorList() and similar methods
  • MUST behave reasonably for all other sensor APIs (for example, by returning true or false as appropriate when applications attempt to register listeners, not calling sensor listeners when the corresponding sensors are not present; etc.)
  • MUST report all sensor measurements using the relevant International System of Units (metric) values for each sensor type as defined in the Android SDK documentation [ Resources, 74 ]
  • SHOULD report the event time in nanoseconds as defined in the Android SDK documentation, representing the time the event happened and synchronized with the SystemClock.elapsedRealtimeNano() clock. Existing and new Android devices are very strongly encouraged to meet these requirement so they will be able to upgrade to the future platform releases where this might become a REQUIRED component. The synchronization error SHOULD be below 100 milliseconds [ Resources, 75 ].

The list above is not comprehensive; the documented behavior of the Android SDK and the Android Open Source Documentations on Sensors [ Resources, 73 ] is to be considered authoritative.

Some sensor types are composite, meaning they can be derived from data provided by one or more other sensors. (Examples include the orientation sensor, and the linear acceleration sensor.) Device implementations SHOULD implement these sensor types, when they include the prerequisite physical sensors as described in [ Resources, 76 ]. If a device implementation includes a composite sensor it MUST implement the sensor as described in the Android Open Source documentation on composite sensors [ Resources, 76 ].

Some Android sensor supports a "continuous" trigger mode, which returns data continuously [ Resources, 77 ]. For any API indicated by the Android SDK documentation to be a continuous sensor, device implementations MUST continuously provide periodic data samples that SHOULD have a jitter below 3%, where jitter is defined as the standard deviation of the difference of the reported timestamp values between consecutiveイベント。

Note that the device implementations MUST ensure that the sensor event stream MUST NOT prevent the device CPU from entering a suspend state or waking up from a suspend state.

Finally, when several sensors are activated, the power consumption SHOULD NOT exceed the sum of the individual sensor's reported power consumption.

7.3.1.加速度計

Device implementations SHOULD include a 3-axis accelerometer. Android Handheld devices and Android Watch devices are strongly encouraged to include this sensor. If a device implementation does include a 3-axis accelerometer, it:

  • MUST implement and report TYPE_ACCELEROMETER sensor [ Resources, 78 ]
  • MUST be able to report events up to a frequency of at least 100 Hz and SHOULD report events up to at least 200 Hz
  • MUST comply with the Android sensor coordinate system as detailed in the Android APIs [ Resources, 74 ]
  • MUST be capable of measuring from freefall up to four times the gravity (4g) or more on any axis
  • MUST have a resolution of at least 8-bits and SHOULD have a resolution of at least 16-bits
  • SHOULD be calibrated while in use if the characteristics changes over the life cycle and compensated, and preserve the compensation parameters between device reboots
  • SHOULD be temperature compensated
  • MUST have a standard deviation no greater than 0.05 m/s^, where the standard deviation should be calculated on a per axis basis on samples collected over a period of at least 3 seconds at the fastest sampling rate
  • SHOULD implement the TYPE_SIGNIFICANT_MOTION, TYPE_TILT_DETECTOR, TYPE_STEP_DETECTOR, TYPE_STEP_COUNTER composite sensors as described in the Android SDK document. Existing and new Android devices are very strongly encouraged to implement the TYPE_SIGNIFICANT_MOTION composite sensor. If any of these sensors are implemented, the sum of their power consumption MUST always be less than 4 mW and SHOULD each be below 2 mW and 0.5 mW for when the device is in a dynamic or static condition.
  • If a gyroscope sensor is included, MUST implement the TYPE_GRAVITY and TYPE_LINEAR_ACCELERATION composite sensors and SHOULD implement the TYPE_GAME_ROTATION_VECTOR composite sensor. Existing and new Android devices are strongly encouraged to implement the TYPE_GAME_ROTATION_VECTOR sensor.
  • SHOULD implement a TYPE_ROTATION_VECTOR composite sensor, if a gyroscope sensor and a magnetometer sensor is also included

7.3.2.磁力計

Device implementations SHOULD include a 3-axis magnetometer (compass). If a device does include a 3-axis magnetometer, it:

  • MUST implement the TYPE_MAGNETIC_FIELD sensor and SHOULD also implement TYPE_MAGNETIC_FIELD_UNCALIBRATED sensor. Existing and new Android devices are strongly encouraged to implement the TYPE_MAGNETIC_FIELD_UNCALIBRATED sensor.
  • MUST be able to report events up to a frequency of at least 10 Hz and SHOULD report events up to at least 50 Hz
  • MUST comply with the Android sensor coordinate system as detailed in the Android APIs [ Resources, 74 ]
  • MUST be capable of measuring between -900 μT and +900 μT on each axis before saturating
  • MUST have a hard iron offset value less than 700 μT and SHOULD have a value below 200 μT, by placing the magnetometer far from dynamic (current-induced) and static (magnet-induced) magnetic fields
  • MUST have a resolution equal or denser than 0.6 μT and SHOULD have a resolution equal or denser than 0.2 μT
  • SHOULD be temperature compensated
  • MUST support online calibration and compensation of the hard iron bias, and preserve the compensation parameters between device reboots
  • MUST have the soft iron compensation applied—the calibration can be done either while in use or during the production of the device
  • SHOULD have a standard deviation, calculated on a per axis basis on samples collected over a period of at least 3 seconds at the fastest sampling rate, no greater than 0.5 μT
  • SHOULD implement a TYPE_ROTATION_VECTOR composite sensor, if an accelerometer sensor and a gyroscope sensor is also included
  • MAY implement the TYPE_GEOMAGNETIC_ROTATION_VECTOR sensor if an accelerometer sensor is also implemented. However if implemented, it MUST consume less than 10 mW and SHOULD consume less than 3 mW when the sensor is registered for batch mode at 10 Hz.

7.3.3. GPS

Device implementations SHOULD include a GPS receiver. If a device implementation does include a GPS receiver, it SHOULD include some form of "assisted GPS" technique to minimize GPS lock-on time.

7.3.4.ジャイロスコープ

Device implementations SHOULD include a gyroscope (angular change sensor). Devices SHOULD NOT include a gyroscope sensor unless a 3-axis accelerometer is also included. If a device implementation includes a gyroscope, it:

  • MUST implement the TYPE_GYROSCOPE sensor and SHOULD also implement TYPE_GYROSCOPE_UNCALIBRATED sensor. Existing and new Android devices are strongly encouraged to implement the SENSOR_TYPE_GYROSCOPE_UNCALIBRATED sensor.
  • MUST be capable of measuring orientation changes up to 1,000 degrees per second
  • MUST be able to report events up to a frequency of at least 100 Hz and SHOULD report events up to at least 200 Hz
  • MUST have a resolution of 12-bits or more and SHOULD have a resolution of 16-bits or more
  • MUST be temperature compensated
  • MUST be calibrated and compensated while in use, and preserve the compensation parameters between device reboots
  • MUST have a variance no greater than 1e-7 rad^2 / s^2 per Hz (variance per Hz, or rad^2 / s). The variance is allowed to vary with the sampling rate, but must be constrained by this value. In other words, if you measure the variance of the gyro at 1 Hz sampling rate it should be no greater than 1e-7 rad^2/s^2.
  • SHOULD implement a TYPE_ROTATION_VECTOR composite sensor, if an accelerometer sensor and a magnetometer sensor is also included
  • If an accelerometer sensor is included, MUST implement the TYPE_GRAVITY and TYPE_LINEAR_ACCELERATION composite sensors and SHOULD implement the TYPE_GAME_ROTATION_VECTOR composite sensor. Existing and new Android devices are strongly encouraged to implement the TYPE_GAME_ROTATION_VECTOR sensor.

7.3.5.バロメーター

Device implementations SHOULD include a barometer (ambient air pressure sensor). If a device implementation includes a barometer, it:

  • MUST implement and report TYPE_PRESSURE sensor
  • MUST be able to deliver events at 5 Hz or greater
  • MUST have adequate precision to enable estimating altitude
  • MUST be temperature compensated

7.3.6.温度計

Device implementations MAY include an ambient thermometer (temperature sensor). If present, it MUST be defined as SENSOR_TYPE_AMBIENT_TEMPERATURE and it MUST measure the ambient (room) temperature in degrees Celsius.

Device implementations MAY but SHOULD NOT include a CPU temperature sensor. If present, it MUST be defined as SENSOR_TYPE_TEMPERATURE, it MUST measure the temperature of the device CPU, and it MUST NOT measure any other temperature. Note the SENSOR_TYPE_TEMPERATURE sensor type was deprecated in Android 4.0.

7.3.7.測光器

Device implementations MAY include a photometer (ambient light sensor).

7.3.8.近接センサー

Device implementations MAY include a proximity sensor. Devices that can make a voice call and indicate any value other than PHONE_TYPE_NONE in getPhoneType SHOULD include a proximity sensor. If a device implementation does include a proximity sensor, it:

  • MUST measure the proximity of an object in the same direction as the screen. That is, the proximity sensor MUST be oriented to detect objects close to the screen, as the primary intent of this sensor type is to detect a phone in use by the user. If a device implementation includes a proximity sensor with any other orientation, it MUST NOT be accessible through this API.
  • MUST have 1-bit of accuracy or more

7.4.データ接続性

7.4.1.電話

"Telephony" as used by the Android APIs and this document refers specifically to hardware related to placing voice calls and sending SMS messages via a GSM or CDMA network. While these voice calls may or may not be packet-switched, they are for the purposes of Android considered independent of any data connectivity that may be implemented using the same network. In other words, the Android "telephony" functionality and APIs refer specifically to voice calls and SMS. For instance, device implementations that cannot place calls or send/receive SMS messages MUST NOT report the android.hardware.telephony feature or any subfeatures, regardless of whether they use a cellular network for data connectivity.

Android MAY be used on devices that do not include telephony hardware. That is, Android is compatible with devices that are not phones. However, if a device implementation does include GSM or CDMA telephony, it MUST implement full support for the API for that technology.テレフォニー ハードウェアを含まないデバイス実装は、完全な API を no-ops として実装しなければなりません (MUST)。

7.4.2. IEEE 802.11 (Wi-Fi)

Android Television device implementations MUST include Wi-Fi support.

Android Television device implementations MUST include support for one or more forms of 802.11 (b/g/a/n, etc.) and other types of Android device implementation SHOULD include support for one or more forms of 802.11. If a device implementation does include support for 802.11 and exposes the functionality to a third-party application, it MUST implement the corresponding Android API and:

  • MUST report the hardware feature flag android.hardware.wifi
  • MUST implement the multicast API as described in the SDK documentation [ Resources, 79 ]
  • MUST support multicast DNS (mDNS) and MUST NOT filter mDNS packets (224.0.0.251) at any time of operation including when the screen is not in an active state

7.4.2.1. Wi-Fiダイレクト

Device implementations SHOULD include support for Wi-Fi Direct (Wi-Fi peer-to-peer). If a device implementation does include support for Wi-Fi Direct, it MUST implement the corresponding Android API as described in the SDK documentation [ Resources, 80 ]. If a device implementation includes support for Wi-Fi Direct, then it:

  • MUST report the hardware feature android.hardware.wifi.direct
  • MUST support regular Wi-Fi operation
  • SHOULD support concurrent Wi-Fi and Wi-Fi Direct operation

Android Television device implementations MUST include support for Wi-Fi Tunneled Direct Link Setup (TDLS).

Android Television device implementations MUST include support for Wi-Fi Tunneled Direct Link Setup (TDLS) and other types of Android device implementations SHOULD include support for Wi-Fi TDLS as described in the Android SDK Documentation [ Resources, 81 ]. If a device implementation does include support for TDLS and TDLS is enabled by the WiFiManager API, the device:

  • SHOULD use TDLS only when it is possible AND beneficial
  • SHOULD have some heuristic and NOT use TDLS when its performance might be worse than going through the Wi-Fi access point

7.4.3.ブルートゥース

Android Television device implementations MUST support Bluetooth and Bluetooth LE and Android Watch device implementations MUST support Bluetooth.

Android includes support for Bluetooth and Bluetooth Low Energy [ Resources, 82 ]. Device implementations that include support for Bluetooth and Bluetooth Low Energy MUST declare the relevant platform features (android.hardware.bluetooth and android.hardware.bluetooth_le respectively) and implement the platform APIs. Device implementations SHOULD implement relevant Bluetooth profiles such as A2DP, AVCP, OBEX, etc. as appropriate for the device. Android Television device implementations MUST support Bluetooth and Bluetooth LE.

Device implementations including support for Bluetooth Low Energy:

  • MUST declare the hardware feature android.hardware.bluetooth_le
  • MUST enable the GATT (generic attribute profile) based Bluetooth APIs as described in the SDK documentation and [ Resources, 82 ]
  • SHOULD support offloading of the filtering logic to the bluetooth chipset when implementing the ScanFilter API [ Resources, 83 ], and MUST report the correct value of where the filtering logic is implemented whenever queried via the android.bluetooth.BluetoothAdapter.isOffloadedFilteringSupported() method
  • SHOULD support offloading of the batched scanning to the bluetooth chipset, but if not supported, MUST report 'false' whenever queried via the android.bluetooth.BluetoothAdapater.isOffloadedScanBatchingSupported() method.
  • SHOULD support multi advertisement with at least 4 slots, but if not supported, MUST report 'false' whenever queried via the android.bluetooth.BluetoothAdapter.isMultipleAdvertisementSupported() method

7.4.4.近距離無線通信

Device implementations SHOULD include a transceiver and related hardware for Near-Field Communications (NFC). If a device implementation does include NFC hardware and plans to make it available to third-party apps, then it:

  • MUST report the android.hardware.nfc feature from the android.content.pm.PackageManager.hasSystemFeature() method [ Resources, 53 ]
  • MUST be capable of reading and writing NDEF messages via the following NFC standards:
    • MUST be capable of acting as an NFC Forum reader/writer (as defined by the NFC Forum technical specification NFCForum-TS-DigitalProtocol-1.0) via the following NFC standards:
      • NfcA (ISO14443-3A)
      • NfcB (ISO14443-3B)
      • NfcF (JIS 6319-4)
      • IsoDep (ISO 14443-4)
      • NFC Forum Tag Types 1, 2, 3, 4 (defined by the NFC Forum)
    • SHOULD be capable of reading and writing NDEF messages via the following NFC standards. Note that while the NFC standards below are stated as SHOULD, the Compatibility Definition for a future version is planned to change these to MUST. These standards are optional in this version but will be required in future versions. Existing and new devices that run this version of Android are very strongly encouraged to meet these requirements now so they will be able to upgrade to the future platform releases.
      • NfcV (ISO 15693)
    • MUST be capable of transmitting and receiving data via the following peer-to-peer standards and protocols:
      • ISO 18092
      • LLCP 1.0 (defined by the NFC Forum)
      • SDP 1.0 (defined by the NFC Forum)
      • NDEF Push Protocol [ Resources, 84 ]
      • SNEP 1.0 (defined by the NFC Forum)
    • MUST include support for Android Beam [ Resources, 85 ]:
      • MUST implement the SNEP default server. Valid NDEF messages received by the default SNEP server MUST be dispatched to applications using the android.nfc.ACTION_NDEF_DISCOVERED intent. Disabling Android Beam in settings MUST NOT disable dispatch of incoming NDEF message.
      • MUST honor the android.settings.NFCSHARING_SETTINGS intent to show NFC sharing settings [ Resources, 86 ]
      • MUST implement the NPP server. Messages received by the NPP server MUST be processed the same way as the SNEP default server.
      • MUST implement a SNEP client and attempt to send outbound P2P NDEF to the default SNEP server when Android Beam is enabled. If no default SNEP server is found then the client MUST attempt to send to an NPP server.
      • MUST allow foreground activities to set the outbound P2P NDEF message using android.nfc.NfcAdapter.setNdefPushMessage, and android.nfc.NfcAdapter.setNdefPushMessageCallback, and android.nfc.NfcAdapter.enableForegroundNdefPush
      • SHOULD use a gesture or on-screen confirmation, such as 'Touch to Beam', before sending outbound P2P NDEF messages
      • SHOULD enable Android Beam by default and MUST be able to send and receive using Android Beam, even when another proprietary NFC P2p mode is turned on
      • MUST support NFC Connection handover to Bluetooth when the device supports Bluetooth Object Push Profile. Device implementations MUST support connection handover to Bluetooth when using android.nfc.NfcAdapter.setBeamPushUris, by implementing the "Connection Handover version 1.2" [ Resources, 87 ] and "Bluetooth Secure Simple Pairing Using NFC version 1.0" [ Resources, 88 ] specs from the NFC Forum. Such an implementation MUST implement the handover LLCP service with service name "urn:nfc:sn:handover" for exchanging the handover request/select records over NFC, and it MUST use the Bluetooth Object Push Profile for the actual Bluetooth data transfer. For legacy reasons (to remain compatible with Android 4.1 devices), the implementation SHOULD still accept SNEP GET requests for exchanging the handover request/select records over NFC. However an implementation itself SHOULD NOT send SNEP GET requests for performing connection handover.
    • MUST poll for all supported technologies while in NFC discovery mode
    • SHOULD be in NFC discovery mode while the device is awake with the screen active and the lock-screen unlocked

(Note that publicly available links are not available for the JIS, ISO, and NFC Forum specifications cited above.)

Android 5.0 includes support for NFC Host Card Emulation (HCE) mode. If a device implementation does include an NFC controller capable of HCE and Application ID (AID) routing, then it:

  • MUST report the android.hardware.nfc.hce feature constant
  • MUST support NFC HCE APIs as defined in the Android SDK [ Resources, 10 ]

Additionally, device implementations MAY include reader/writer support for the following MIFARE technologies.

  • MIFARE Classic
  • MIFARE Ultralight
  • NDEF on MIFARE Classic

Note that Android includes APIs for these MIFARE types. If a device implementation supports MIFARE in the reader/writer role, it:

  • MUST implement the corresponding Android APIs as documented by the Android SDK
  • MUST report the feature com.nxp.mifare from the android.content.pm.PackageManager.hasSystemFeature() meth od [Resources, 53] . Note that this is not a standard Android feature and as such does not appear as a constant on the PackageManager class.
  • MUST NOT implement the corresponding Android APIs nor report the com.nxp.mifare feature unless it also implements general NFC support as described in this section

If a device implementation does not include NFC hardware, it MUST NOT declare the android.hardware.nfc feature from the android.content.pm.PackageManager.hasSystemFeature() method [ Resources, 53] , and MUST implement the Android NFC API as a no-op.

As the classes android.nfc.NdefMessage and android.nfc.NdefRecord represent a protocol-independent data representation format, device implementations MUST implement these APIs even if they do not include support for NFC or declare the android.hardware.nfc feature.

7.4.5.最小限のネットワーク能力

Device implementations MUST include support for one or more forms of data networking. Specifically, device implementations MUST include support for at least one data standard capable of 200Kbit/sec or greater. Examples of technologies that satisfy this requirement include EDGE, HSPA, EV-DO, 802.11g, Ethernet, Bluetooth PAN, etc.

Device implementations where a physical networking standard (such as Ethernet) is the primary data connection SHOULD also include support for at least one common wireless data standard, such as 802.11 (Wi-Fi).

Devices MAY implement more than one form of data connectivity.

7.4.6.同期設定

Device implementations MUST have the master auto-sync setting on by default so that the method getMasterSyncAutomatically() returns "true" [ Resources, 89 ].

7.5。カメラ

Device implementations SHOULD include a rear-facing camera and MAY include a front-facing camera. A rear-facing camera is a camera located on the side of the device opposite the display; that is, it images scenes on the far side of the device, like a traditional camera. A front-facing camera is a camera located on the same side of the device as the display; that is, a camera typically used to image the user, such as for video conferencing and similar applications.

If a device implementation includes at least one camera, it SHOULD be possible for an application to simultaneously allocate 3 bitmaps equal to the size of the images produced by the largest-resolution camera sensor on the device.

7.5.1.背面カメラ

Device implementations SHOULD include a rear-facing camera. If a device implementation includes at least one rear-facing camera, it:

  • MUST report the feature flag android.hardware.camera and android.hardware.camera.any
  • 少なくとも2メガピクセルの解像度が必要です
  • SHOULD have either hardware auto-focus or software auto-focus implemented in the camera driver (transparent to application software)
  • 固定焦点または EDOF (拡張被写界深度) ハードウェアを備えている場合があります
  • フラッシュが含まれる場合があります。カメラにフラッシュが含まれている場合、android.hardware.Camera.PreviewCallback インスタンスがカメラ プレビュー サーフェスに登録されている間は、アプリケーションがフラッシュを明示的に有効にしてフラッシュを有効にしていない限り、フラッシュ ランプを点灯してはなりません (MUST NOT)。 Camera.Parameters オブジェクト。 Note that this constraint does not apply to the device's built-in system camera application, but only to third-party applications using Camera.PreviewCallback.

7.5.2.前面カメラ

デバイス実装には、前面カメラが含まれてもよい(MAY)。 If a device implementation includes at least one front-facing camera, it:

  • MUST report the feature flag android.hardware.camera.any and android.hardware.camera.front
  • MUST have a resolution of at least VGA (640x480 pixels)
  • MUST NOT use a front-facing camera as the default for the Camera API. The camera API in Android has specific support for front-facing cameras and device implementations MUST NOT configure the API to to treat a front-facing camera as the default rear-facing camera, even if it is the only camera on the device.
  • MAY include features (such as auto-focus, flash, etc.) available to rear-facing cameras as described in section 7.5.1
  • MUST horizontally reflect (ie mirror) the stream displayed by an app in a CameraPreview, as follows:
    • If the device implementation is capable of being rotated by user (such as automatically via an accelerometer or manually via user input), the camera preview MUST be mirrored horizontally relative to the device's current orientation.
    • If the current application has explicitly requested that the Camera display be rotated via a call to the android.hardware.Camera.setDisplayOrientation()[ Resources, 90 ] method, the camera preview MUST be mirrored horizontally relative to the orientation specified by the application.
    • Otherwise, the preview MUST be mirrored along the device's default horizontal axis.
  • MUST mirror the image displayed by the postview in the same manner as the camera preview image stream. If the device implementation does not support postview, this requirement obviously does not apply.
  • MUST NOT mirror the final captured still image or video streams returned to application callbacks or committed to media storage

7.5.3.外部カメラ

Device implementations with USB host mode MAY include support for an external camera that connects to the USB port. If a device includes support for an external camera, it:

  • MUST declare the platform feature android.hardware.camera.external and android.hardware camera.any
  • MUST support USB Video Class (UVC 1.0 or higher)
  • MAY support multiple cameras

Video compression (such as MJPEG) support is RECOMMENDED to enable transfer of high-quality unencoded streams (ie raw or independently compressed picture streams). Camera-based video encoding MAY be supported. If so, a simultaneous unencoded/ MJPEG stream (QVGA or greater resolution) MUST be accessible to the device implementation.

7.5.4.カメラ API の動作

Android includes two API packages to access the camera, the newer android.hardware.camera2 API expose lower-level camera control to the app, including efficient zero-copy burst/streaming flows and per-frame controls of exposure, gain, white balance gains, color conversion, denoising, sharpening, and more.

The older API package, android.hardware.Camera, is marked as deprecated in Android 5.0 but as it should still be available for apps to use Android device implementations MUST ensure the continued support of the API as described in this section and in the Android SDK 。

Device implementations MUST implement the following behaviors for the camera-related APIs, for all available cameras:

  • アプリケーションが android.hardware.Camera.Parameters.setPreviewFormat(int) を呼び出したことがない場合、デバイスはアプリケーションのコールバックに提供されるプレビュー データとして android.hardware.PixelFormat.YCbCr_420_SP を使用しなければなりません。
  • アプリケーションが android.hardware.Camera.PreviewCallback インスタンスを登録し、プレビュー形式が YCbCr_420_SP のときにシステムが onPreviewFrame() メソッドを呼び出す場合、onPreviewFrame() に渡される byte[] 内のデータはさらに NV21 エンコード形式である必要があります。 That is, NV21 MUST be the default.
  • For android.hardware.Camera, device implementations MUST support the YV12 format (as denoted by the android.graphics.ImageFormat.YV12 constant) for camera previews for both front- and rear-facing cameras. (The hardware video encoder and camera may use any native pixel format, but the device implementation MUST support conversion to YV12.)
  • For android.hardware.camera2, device implementations must support the android.hardware.ImageFormat.YUV_420_888 and android.hardware.ImageFormat.JPEG formats as outputs through the android.media.ImageReader API.

Device implementations MUST still implement the full Camera API included in the Android SDK documentation [ Resources, 91 ], regardless of whether the device includes hardware autofocus or other capabilities. For instance, cameras that lack autofocus MUST still call any registered android.hardware.Camera.AutoFocusCallback instances (even though this has no relevance to a non-autofocus camera.) Note that this does apply to front-facing cameras; for instance, even though most front-facing cameras do not support autofocus, the API callbacks must still be "faked" as described.

デバイス実装は、基盤となるハードウェアがその機能をサポートしている場合、android.hardware.Camera.Parameters クラスの定数として定義された各パラメータ名を認識し、尊重しなければなりません (MUST)。デバイスのハードウェアが機能をサポートしていない場合、API は文書に従って動作する必要があります。 Conversely, device implementations MUST NOT honor or recognize string constants passed to the android.hardware.Camera.setParameters() method other than those documented as constants on the android.hardware.Camera.Parameters.つまり、デバイス実装は、ハードウェアが許可する場合はすべての標準カメラ パラメータをサポートしなければならず、カスタム カメラ パラメータ タイプをサポートしてはなりません。 For instance, device implementations that support image capture using high dynamic range (HDR) imaging techniques MUST support camera parameter Camera.SCENE_MODE_HDR [ Resources, 92 ].

Because not all device implementations can fully support all the features of the android.hardware.camera2 API, device implementations MUST report the proper level of support with the android.info.supportedHardwareLevel property as described in the Android SDK [ Resources, 93] and report the appropriate framework feature flags [ Resources, 94] .

Device implementations MUST also declare its Individual camera capabilities of android.hardware.camera2 via the android.request.availableCapabilities property and declare the appropriate feature flags [ Resources, 94] ; a device must define the feature flag if any of its attached camera devices supports the feature.

Device implementations MUST broadcast the Camera.ACTION_NEW_PICTURE intent whenever a new picture is taken by the camera and the entry of the picture has been added to the media store.

Device implementations MUST broadcast the Camera.ACTION_NEW_VIDEO intent whenever a new video is recorded by the camera and the entry of the picture has been added to the media store.

7.5.5.カメラの向き

Both front- and rear-facing cameras, if present, MUST be oriented so that the long dimension of the camera aligns with the screen's long dimension. That is, when the device is held in the landscape orientation, cameras MUST capture images in the landscape orientation. This applies regardless of the device's natural orientation; that is, it applies to landscape-primary devices as well as portrait-primary devices.

7.6.メモリとストレージ

7.6.1.最小限のメモリとストレージ

Android Television devices MUST have at least 5GB of non-volatile storage available for application private data.

The memory available to the kernel and userspace on device implementations MUST be at least equal or larger than the minimum values specified by the following table. (See section 7.1.1 for screen size and density definitions.)

Density and screen size

32-bit device

64-bit device

Android Watch devices (due to smaller screens)

416MB

適用できない

xhdpi or lower on small/normal screens

hdpi or lower on large screens

mdpi or lower on extra large screens

512MB

832MB

400dpi or higher on small/normal screens

xhdpi or higher on large screens

tvdpi or higher on extra large screens

896MB

1280MB

560dpi or higher on small/normal screens

400dpi or higher on large screens

xhdpi or higher on extra large screens

1344MB

1824MB

The minimum memory values MUST be in addition to any memory space already dedicated to hardware components such as radio, video, and so on that is not under the kernel's control.

Android Television devices MUST have at least 5GB and other device implementations MUST have at least 1.5GB of non-volatile storage available for application private data. That is, the /data partition MUST be at least 5GB for Android Television devices and at least 1.5GB for other device implementations. Device implementations that run Android are very strongly encouraged to have at least 3GB of non-volatile storage for application private data so they will be able to upgrade to the future platform releases.

The Android APIs include a Download Manager that applications MAY use to download data files [ Resources, 95 ]. The device implementation of the Download Manager MUST be capable of downloading individual files of at least 100MB in size to the default "cache" location.

7.6.2.アプリケーション共有ストレージ

Device implementations MUST offer shared storage for applications also often referred as “shared external storage”.

デバイス実装は、「すぐに使える」デフォルトでマウントされた共有ストレージを使用して構成する必要があります。 If the shared storage is not mounted on the Linux path /sdcard, then the device MUST include a Linux symbolic link from /sdcard to the actual mount point.

Device implementations MAY have hardware for user-accessible removable storage, such as a Secure Digital (SD) card slot. If this slot is used to satisfy the shared storage requirement, the device implementation:

  • MUST implement a toast or pop-up user interface warning the user when there is no SD card
  • MUST include a FAT-formatted SD card 1GB in size or larger OR show on the box and other material available at time of purchase that the SD card has to be separately purchased
  • MUST mount the SD card by default

Alternatively, device implementations MAY allocate internal (non-removable) storage as shared storage for apps as included in the upstream Android Open Source Project; device implementations SHOULD use this configuration and software implementation. If a device implementation uses internal (non-removable) storage to satisfy the shared storage requirement, that storage MUST be 1GB in size or larger and mounted on /sdcard (or /sdcard MUST be a symbolic link to the physical location if it is mounted elsewhere).

デバイスの実装は、Android.permission.write_external_storageの許可を文書化したように、この共有ストレージの許可を強制する必要があります。それ以外の場合、共有ストレージは、その許可を取得するアプリケーションによって書かれている必要があります。

Device implementations that include multiple shared storage paths (such as both an SD card slot and shared internal storage) MUST allow only pre-installed & privileged Android applications with the WRITE_EXTERNAL_STORAGE permission to write to the secondary external storage, except for the package-specific directories on the secondary external storage, but SHOULD expose content from both storage paths transparently through Android's media scanner service and android.provider.MediaStore.

Regardless of the form of shared storage used, device implementations MUST provide some mechanism to access the contents of shared storage from a host computer, such as USB mass storage (UMS) or Media Transfer Protocol (MTP). Device implementations MAY use USB mass storage, but SHOULD use Media Transfer Protocol. If the device implementation supports Media Transfer Protocol, it:

  • SHOULD be compatible with the reference Android MTP host, Android File Transfer [ Resources, 96 ]
  • SHOULD report a USB device class of 0x00
  • SHOULD report a USB interface name of 'MTP'

If the device implementation lacks USB ports, it MUST provide a host computer with access to the contents of shared storage by some other means, such as a network file system.

7.7. USB

Device implementations SHOULD support USB peripheral mode and SHOULD support USB host mode.

If a device implementation includes a USB port supporting peripheral mode:

  • The port MUST be connectable to a USB host that has a standard type-A or type -C USB port.
  • The port SHOULD use micro-B, micro-AB or Type-C USB form factor. Existing and new Android devices are STRONGLY RECOMMENDED to meet these requirements so they will be able to upgrade to future platform releases.
  • The port SHOULD either be located on the bottom of the device (according to natural orientation) or enable software screen rotation for all apps (including home screen), so that the display draws correctly when the device is oriented with the port at bottom. Existing and new Android devices are STRONGLY RECOMMENDED to meet these requirements so they will be able to upgrade to future platform releases.
  • It SHOULD implement the Android Open Accessory (AOA) API and specification as documented in the Android SDK documentation, and if it is an Android Handheld device it MUST implement the AOA API. Device implementations implementing the AOA specification:
    • MUST declare support for the hardware feature android.hardware.usb.accessory [ Resources, 97 ]
    • MUST implement the USB audio class as documented in the Android SDK documentation [ Resources, 98 ]
  • It SHOULD implement support to draw 1.5 A current during HS chirp and traffic as specified in the USB Battery Charging Specification, Revision 1.2 [ Resources, 99 ]. Existing and new Android devices are STRONGLY RECOMMENDED to meet these requirements so they will be able to upgrade to the future platform releases.
  • The value of iSerialNumber in USB standard device descriptor MUST be equal to the value of android.os.Build.SERIAL.

If a device implementation includes a USB port supporting host mode, it:

  • SHOULD use a type-C USB port, if the device implementation supports USB 3.1
  • MAY use a non-standard port form factor, but if so MUST ship with a cable or cables adapting the port to a standard type-A or type-C USB port
  • MAY use a micro-AB USB port, but if so SHOULD ship with a cable or cables adapting the port to a standard type-A or type-C USB port
  • is very strongly RECOMMENDED to implement the USB audio class as documented in the Android SDK documentation [ Resources, 98 ]
  • MUST implement the Android USB host API as documented in the Android SDK, and MUST declare support for the hardware feature android.hardware.usb.host [ Resources, 100 ]
  • SHOULD support the Charging Downstream Port output current range of 1.5 A ~ 5 A as specified in the USB Battery Charging Specification, Revision 1.2 [ Resources, 99 ].

7.8.オーディオ

7.8.1.マイクロフォン

Android Handheld and Watch devices MUST include a microphone.

Device implementations MAY omit a microphone. However, if a device implementation omits a microphone, it MUST NOT report the android.hardware.microphone feature constant, and MUST implement the audio recording API at least as no-ops, per section 7 . Conversely, device implementations that do possess a microphone:

  • MUST report the android.hardware.microphone feature constant
  • MUST meet the audio recording requirements in section 5.4
  • MUST meet the audio latency requirements in section 5.6

7.8.2.オーディオ出力

Android Watch devices MAY include an audio output.

Device implementations including a speaker or with an audio/multimedia output port for an audio output peripheral as a headset or an external speaker:

  • MUST report the android.hardware.audio.output feature constant
  • MUST meet the audio playback requirements in section 5.5
  • MUST meet the audio latency requirements in section 5.6

Conversely, if a device implementation does not include a speaker or audio output port, it MUST NOT report the android.hardware.audio output feature, and MUST implement the Audio Output related APIs as no-ops at least.

Android Watch device implementation MAY but SHOULD NOT have audio output, but other types of Android device implementations MUST have an audio output and declare android.hardware.audio.output.

7.8.2.1。アナログオーディオポート

In order to be compatible with the headsets and other audio accessories using the 3.5mm audio plug across the Android ecosystem [ Resources, 101 ], if a device implementation includes one or more analog audio ports, at least one of the audio port(s) SHOULD be a 4 conductor 3.5mm audio jack. If a device implementation has a 4 conductor 3.5mm audio jack, it:

  • MUST support audio playback to stereo headphones and stereo headsets with a microphone, and SHOULD support audio recording from stereo headsets with a microphone
  • MUST support TRRS audio plugs with the CTIA pin-out order, and SHOULD support audio plugs with the OMTP pin-out order
  • MUST support the detection of microphone on the plugged in audio accessory, if the device implementation supports a microphone, and broadcast the android.intent.action.HEADSET_PLUG with the extra value microphone set as 1
  • SHOULD support the detection and mapping to the keycodes for the following 3 ranges of equivalent impedance between the microphone and ground conductors on the audio plug:
    • 70 ohm or less : KEYCODE_HEADSETHOOK
    • 210–290 Ohm : KEYCODE_VOLUME_UP
    • 360–680 Ohm : KEYCODE_VOLUME_DOWN
  • SHOULD support the detection and mapping to the keycode for the following range of equivalent impedance between the microphone and ground conductors on the audio plug:
    • 110–180 Ohm: KEYCODE_VOICE_ASSIST
  • MUST trigger ACTION_HEADSET_PLUG upon a plug insert, but only after all contacts on plug are touching their relevant segments on the jack
  • MUST be capable of driving at least 150mV +/- 10% of output voltage on a 32 Ohm speaker impedance
  • MUST have a microphone bias voltage between 1.8V ~ 2.9V

8. Performance Compatibility

Some minimum performance criterias are critical to the user experience and impacts the baseline assumptions developers would have when developing an app. Android Watch devices SHOULD and other type of device implementations MUST meet the following criteria:

8.1.ユーザーエクスペリエンスの一貫性

Device implementations MUST provide a smooth user interface by ensuring a consistent frame rate and response times for applications and games. Device implementations MUST meet the following requirements:

  • Consistent frame latency Inconsistent frame latency or a delay to render frames MUST NOT happen more often than 5 frames in a second, and SHOULD be below 1 frames in a second.
  • User interface latency Device implementations MUST ensure low latency user experience by scrolling a list of 10K list entries as defined by the Android Compatibility Test Suite (CTS) in less than 36 secs.
  • Task switching When multiple applications have been launched, re-launching an already-running application after it has been launched MUST take less than 1 second.

8.2.ファイル I/O アクセスのパフォーマンス

Device implementations MUST ensure file access performance consistency for read and write operations.

  • Sequential write Device implementations MUST ensure a sequential write performance of 5MB/s for a 256MB file using 10MB write buffer.
  • Random write Device implementations MUST ensure a random write performance of 0.5MB/s for a 256MB file using 4KB write buffer.
  • Sequential read Device implementations MUST ensure a sequential read performance of 15MB/s for a 256MB file using 10MB write buffer.
  • Random read Device implementations MUST ensure a random read performance of 3.5MB/s for a 256MB file using 4KB write buffer.

9. セキュリティモデルの互換性

Device implementations MUST implement a security model consistent with the Android platform security model as defined in Security and Permissions reference document in the APIs [ Resources, 102 ] in the Android developer documentation.デバイスの実装は、第三者/当局からの追加の権限/証明書を必要とせずに、自己署名アプリケーションのインストールをサポートする必要があります。 Specifically, compatible devices MUST support the security mechanisms described in the follow subsections.

9.1.権限

Device implementations MUST support the Android permissions model as defined in the Android developer documentation [ Resources, 102 ].具体的には、実装は、SDKドキュメントで説明されているように定義された各許可を実施する必要があります。許可は省略、変更、または無視することはできません。新しい許可ID文字列がAndroidにない場合、実装は追加のアクセス許可を追加する場合があります。*名前空間。

9.2. UID とプロセスの分離

Device implementations MUST support the Android application sandbox model, in which each application runs as a unique Unixstyle UID and in a separate process. Device implementations MUST support running multiple applications as the same Linux user ID, provided that the applications are properly signed and constructed, as defined in the Security and Permissions reference [ Resources, 102 ].

9.3.ファイルシステムのアクセス許可

Device implementations MUST support the Android file access permissions model as defined in the Security and Permissions reference [ Resources, 102 ].

9.4.代替実行環境

Device implementations MAY include runtime environments that execute applications using some other software or technology than the Dalvik Executable Format or native code.ただし、このセクションで説明されているように、このような代替実行環境は、AndroidセキュリティモデルやインストールされているAndroidアプリケーションのセキュリティを妥協してはなりません。

Alternate runtimes MUST themselves be Android applications, and abide by the standard Android security model, as described elsewhere in section 9 .

Alternate runtimes MUST NOT be granted access to resources protected by permissions not requested in the runtime's AndroidManifest.xml file via the機構。

代替ランタイムは、システムアプリケーションに制限されたAndroid許可によって保護されている機能を使用することを許可してはなりません。

Android Sandboxモデルには、代替のランタイムが順守する必要があります。 Specifically, alternate runtimes:

  • SHOULD install apps via the PackageManager into separate Android sandboxes ( Linux user IDs, etc.)
  • MAY provide a single Android sandbox shared by all applications using the alternate runtime
  • and installed applications using an alternate runtime, MUST NOT reuse the sandbox of any other app installed on the device, except through the standard Android mechanisms of shared user ID and signing certificate
  • MUST NOT launch with, grant, or be granted access to the sandboxes corresponding to other Android applications
  • MUST NOT be launched with, be granted, or grant to other applications any privileges of the superuser (root), or of any other user ID

代替ランタイムの.apkファイルは、デバイスの実装のシステム画像に含まれる場合がありますが、デバイスの実装に含まれる他のアプリケーションに署名するために使用されるキーとは異なるキーで署名する必要があります。

アプリケーションをインストールする場合、代替の実行タイムは、アプリケーションで使用されているAndroid許可のユーザー同意を取得する必要があります。 If an application needs to make use of a device resource for which there is a corresponding Android permission (such as Camera, GPS, etc.), the alternate runtime MUST inform the user that the application will be able to access that resource.ランタイム環境がこの方法でアプリケーション機能を記録しない場合、ランタイム環境は、そのランタイムを使用してアプリケーションをインストールするときにランタイム自体が保持するすべてのアクセス許可をリストする必要があります。

9.5。マルチユーザーのサポート

This feature is optional for all device types.

Android includes support for multiple users and provides support for full user isolation [ Resources, 103] . Device implementations MAY enable multiple users, but when enabled MUST meet the following requirements related to multi-user support [ Resources, 104 ]:

  • Device implementations that do not declare the android.hardware.telephony feature flag MUST support restricted profiles, a feature that allows device owners to manage additional users and their capabilities on the device. With restricted profiles, device owners can quickly set up separate environments for additional users to work in, with the ability to manage finer-grained restrictions in the apps that are available in those environments.
  • Conversely device implementations that declare the android.hardware.telephony feature flag MUST NOT support restricted profiles but MUST align with the AOSP implementation of controls to enable /disable other users from accessing the voice calls and SMS.
  • Device implementations MUST, for each user, implement a security model consistent with the Android platform security model as defined in Security and Permissions reference document in the APIs [ Resources, 102 ]
  • Device implementations MAY support creating users and managed profiles via the android.app.admin.DevicePolicyManager APIs, and if supported, MUST declare the platform feature flag android.software.managed_users.
  • Device implementations that declare the feature flag android.software.managed_users MUST use the upstream AOSP icon badge to represent the managed applications and other badge UI elements like Recents & Notifications.
  • Each user instance on an Android device MUST have separate and isolated external storage directories. Device implementations MAY store multiple users' data on the same volume or filesystem. However, the device implementation MUST ensure that applications owned by and running on behalf a given user cannot list, read, or write to data owned by any other user. Note that removable media, such as SD card slots, can allow one user to access another's data by means of a host PC. For this reason, device implementations that use removable media for the primary external storage APIs MUST encrypt the contents of the SD card if multiuser is enabled using a key stored only on non-removable media accessible only to the system. As this will make the media unreadable by a host PC, device implementations will be required to switch to MTP or a similar system to provide host PCs with access to the current user's data. Accordingly, device implementations MAY but SHOULD NOT enable multi-user if they use removable media [ Resources, 105 ] for primary external storage.

9.6.プレミアムSMSの警告

Android includes support for warning users of any outgoing premium SMS message [ Resources, 106 ] . Premium SMS messages are text messages sent to a service registered with a carrier that may incur a charge to the user. Device implementations that declare support for android.hardware.telephony MUST warn users before sending a SMS message to numbers identified by regular expressions defined in /data/misc/sms/codes.xml file in the device. The upstream Android Open Source Project provides an implementation that satisfies this requirement.

9.7.カーネルのセキュリティ機能

The Android Sandbox includes features that use the Security-Enhanced Linux (SELinux) mandatory access control (MAC) system and other security features in the Linux kernel. SELinux or any other security features implemented below the Android framework:

  • MUST maintain compatibility with existing applications
  • MUST NOT have a visible user interface when a security violation is detected and successfully blocked, but MAY have a visible user interface when an unblocked security violation occurs resulting in a successful exploit
  • SHOULD NOT be user or developer configurable

If any API for configuration of policy is exposed to an application that can affect another application (such as a Device Administration API), the API MUST NOT allow configurations that break compatibility.

Devices MUST implement SELinux or, if using a kernel other than Linux, an equivalent mandatory access control system. Devices must also meet the following requirements, which are satisfied by the reference implementation in the upstream Android Open Source Project.

デバイスの実装:

  • MUST set SELinux to global enforcing mode,
  • MUST configure all domains in enforcing mode. No permissive mode domains are allowed, including domains specific to a device/vendor.
  • MUST NOT modify, omit, or replace the neverallow rules present within the external/sepolicy folder provided in the upstream Android Open Source Project (AOSP) and the policy MUST compile with all neverallow rules present, for both AOSP SELinux domains as well as device/vendor specific domains.

Device implementations SHOULD retain the default SELinux policy provided in the external/sepolicy folder of the upstream Android Open Source Project and only further add to this policy for their own device-specific configuration. Device implementations MUST be compatible with the upstream Android Open Source Project.

9.8。プライバシー

If the device implements functionality in the system that captures the contents displayed on the screen and/or records the audio stream played on the device, it MUST continuously notify the user whenever this functionality is enabled and actively capturing/recording.

9.9。 Full-Disk Encryption

Optional for Android device implementations without a lock screen.

If the device implementation has a lock screen, the device MUST support full-disk encryption of the application private data, (/data partition) as well as the SD card partition if it is a permanent, non-removable part of the device [ Resources, 107 ]. For devices supporting full-disk encryption, the full-disk encryption SHOULD be enabled all the time after the user has completed the out-of-box experience. While this requirement is stated as SHOULD for this version of the Android platform, it is very strongly RECOMMENDED as we expect this to change to MUST in the future versions of Android. Encryption MUST use AES with a key of 128-bits (or greater) and a mode designed for storage (for example, AES-XTS, AES-CBC-ESSIV). The encryption key MUST NOT be written to storage at any time without being encrypted. Other than when in active use, the encryption key SHOULD be AES encrypted with the lockscreen passcode stretched using a slow stretching algorithm (eg PBKDF2 or scrypt). If the user has not specified a lockscreen passcode or has disabled use of the passcode for encryption, the system SHOULD use a default passcode to wrap the encryption key. If the device provides a hardware-backed keystore, the password stretching algorithm MUST be cryptographically bound to that keystore. The encryption key MUST NOT be sent off the device (even when wrapped with the user passcode and/or hardware bound key). The upstream Android Open Source project provides a preferred implementation of this feature based on the linux kernel feature dm-crypt.

9.10。 Verified Boot

Device implementations SHOULD support verified boot for device integrity, and if the feature is supported it MUST declare the platform feature flag android.software.verified_boot. While this requirement is stated as SHOULD for this version of the Android platform, it is very strongly RECOMMENDED as we expect this to change to MUST in the future versions of Android. The upstream Android Open Source Project provides a preferred implementation of this feature based on the linux kernel feature dm-verity.

10. ソフトウェア互換性テスト

Device implementations MUST pass all tests described in this section.

However, note that no software test package is fully comprehensive. For this reason, device implementers are very strongly encouraged to make the minimum number of changes as possible to the reference and preferred implementation of Android available from the Android Open Source Project. This will minimize the risk of introducing bugs that create incompatibilities requiring rework and potential device updates.

10.1.互換性テストスイート

Device implementations MUST pass the Android Compatibility Test Suite (CTS) [ Resources, 108 ] available from the Android Open Source Project, using the final shipping software on the device.さらに、デバイスの実装者は、Androidオープンソースツリーの参照実装を可能な限り使用する必要があり、CTSのあいまいさの場合および参照ソースコードの部分の再実装の互換性を確保する必要があります。

CTSは、実際のデバイスで実行されるように設計されています。他のソフトウェアと同様に、CTS自体にバグが含まれている場合があります。 The CTS will be versioned independently of this Compatibility Definition, and multiple revisions of the CTS may be released for Android 5.0.デバイスの実装は、デバイスソフトウェアが完了したときに利用可能な最新のCTSバージョンに合格する必要があります。

10.2. CTS 検証者

Device implementations MUST correctly execute all applicable cases in the CTS Verifier. The CTS Verifier is included with the Compatibility Test Suite, and is intended to be run by a human operator to test functionality that cannot be tested by an automated system, such as correct functioning of a camera and sensors.

The CTS Verifier has tests for many kinds of hardware, including some hardware that is optional. Device implementations MUST pass all tests for hardware that they possess; for instance, if a device possesses an accelerometer, it MUST correctly execute the Accelerometer test case in the CTS Verifier. Test cases for features noted as optional by this Compatibility Definition Document MAY be skipped or omitted.

Every device and every build MUST correctly run the CTS Verifier, as noted above. However, since many builds are very similar, device implementers are not expected to explicitly run the CTS Verifier on builds that differ only in trivial ways. Specifically, device implementations that differ from an implementation that has passed the CTS Verifier only by the set of included locales, branding, etc. MAY omit the CTS Verifier test.

11. 更新可能なソフトウェア

デバイスの実装には、システムソフトウェア全体を置き換えるメカニズムを含める必要があります。 The mechanism need not perform "live" upgrades—that is, a device restart MAY be required.

デバイスにプリインストールされたソフトウェア全体を交換できる場合、すべての方法を使用できます。たとえば、次のアプローチのいずれかがこの要件を満たします。

  • Over-The-Air(OTA)は、再起動を介してオフラインの更新を備えたダウンロード
  • ホストPCからUSBを介した「テザー」アップデート
  • 「オフライン」は、取り外し可能なストレージ上のファイルからの再起動と更新を介して更新されます

However, if the device implementation includes support for an unmetered data connection such as 802.11 or Bluetooth PAN (Personal Area Network) profile, the device MUST support Over-the-air download with offline update via reboot.

使用される更新メカニズムは、ユーザーデータを拭かないで更新をサポートする必要があります。 That is, the update mechanism MUST preserve application private data and application shared data.上流のAndroidソフトウェアには、この要件を満たす更新メカニズムが含まれていることに注意してください。

For device implementations that are launching with Android 5.0 and later, the update mechanism SHOULD support verifying that the system image is binary identical to expected result following an OTA. The block-based OTA implementation in the upstream Android Open Source Project, added since Android 5.0, satisfies this requirement.

If an error is found in a device implementation after it has been released but within its reasonable product lifetime that is determined in consultation with the Android Compatibility Team to affect the compatibility of third-party applications, the device implementer MUST correct the error via a softwareこれまでに説明したメカニズムに従って適用できる更新を利用可能にします。

12. 文書変更履歴

The following table contains a summary of the changes to the Compatibility Definition in this release.

Section(s)

Summary of change

1. はじめに

Updated requirements to refer to SDK documentation as source of truth.

2. デバイスの種類

Included definitions for device types for handheld, television, and watch devices.

2.1 Device Configuration

Added non-exhaustive list to illustrate hardware configuration deviation across devices.

3.1.マネージド API の互換性

MUST also provide complete implementations of APIs with "@SystemApi" marker in the upstream Android source code.

3.2.2.ビルドパラメータ

Included SUPPORTED_ABIS, SUPPORTED_32_BIT_ABIS, and SUPPORTED_64_BIT_ABIS parameters in list, updated PRODUCT to require unique Product SKUs, and updated TAGS.

3.2.3.1.コアアプリケーションの意図

Clarified language that the compatibility requirement is for mainly the intents pattern

3.2.3.5.デフォルトのアプリ設定

Included new requirements for home screen, NFC, and default SMS applications.

3.3.1 Application Binary Interfaces

Added requirements to support equivalent 32-bit ABI if any 64-bit ABI is supported. Updated parameters to reflect this change.

3.4.1. WebView の互換性

Webview compatibility required for all devices except Android Watch devices. Removed Locale string requirement.

3.4.2.ブラウザの互換性

Android Television and Watch Devices MAY omit a browser application, but all other types of device implementations MUST include one.

3.7. Runtime compatibility

Updated Minimum application memory requirements

3.8.2.ウィジェット

Widget support is optional for all device types, but recommended for Handheld Devices.

3.8.3.通知

Expanded definitions for types of supported notifications.

3.8.4.検索

Android Television devices MUST include global search. All other device types SHOULD.

3.8.6.テーマ

Devices MUST support material theme.

3.8.7.ライブ壁紙

Devices that include live wallpaper MUST report the platform feature flag android.software.live_wallpaper.

3.8.8.アクティビティの切り替え

Advised requirement to support new Recents User Interface.

少なくとも4つのアクティビティのタイトルを一度に表示する必要があります。

3.8.10。 Lock Screen Media Remote Control

Remote Control Client API deprecated in favor of the Media Notification Template

3.8.11。夢

Optional for Android Watch devices. Required for all other device types.

3.8.13 Unicode and font

MUST support Roboto 2 in addition to existing requirements.

3.12. TV 入力フレームワーク

Android Television device implementations MUST support Television Input Framework.

5.1.メディアコーデック

Added 3 sections for Audio, Image, and Video codecs.

5.4 Audio Recording

Broken into subsections

5.4.1. Raw audio capture

Defined characteristics for raw audio capture on devices that declare android.hardware.microphone

5.5.オーディオの再生

Added section 5.5. Audio Playback with 2 subsections: 5.5.1 Audio Effects and 5.5.2.音声出力音量

5.6 Audio Latency

Added definitions and requirements for cold output jitter, cold input jitter, and continuous round-trip latency.

5.8 Secure Media

Included secure media requirements from 7.1.8. External Displays and added requirements for Android Television.

6.1.開発者ツール

Updated resources.

6.2.1.実験的

Removed section

7. ハードウェアの互換性

Updated to reflect that device implementations MUST consistently report accurate hardware configuration for the same build fingerprint.

7.1.1.1.画面サイズ

Updated to reflect Android Watch devices screen size and that the value can't change

7.1.1.2.画面のアスペクト比

Updated to reflect Android Watch devices screen aspect ratio (1:1).

7.1.3.画面の向き

Updated to reflect that devices with a fixed orientation landscape screen SHOULD only report that orientation.

7.1.4. 2D および 3D グラフィックスの高速化

Added that Android devices MAY support the Android extension pack.

(old) 7.1.6. Screen Types

Section Removed

7.1.6.スクリーンテクノロジー

Updated pixel aspect ratio (PAR) to be between 0.9 and 1.15. (~15% tolerance)

7.1.7. External Displays

Moved part of section to section 5.8. Secure Media.

7.2.2.非タッチナビゲーション

Android Television devices MUST support D-pad.

7.2.3.ナビゲーションキー

Included language for support across different device types.

7.2.4.タッチスクリーン入力

Android Watch devices MUST support touchscreen input.

7.2.6.ゲームコントローラーのサポート

Added section with Android Television requirements.

7.2.7.リモコン

Added section with Android Television requirements.

7.3.センサー

Redefined synthetic sensors as composite sensors and streaming sensors as continuous sensors. Sensors should report event time in nanoseconds.

7.3.1.加速度計

Clarified required sensor types and revised requirement thresholds.

7.3.2.磁力計

Clarified required sensor types and revised requirement thresholds.

7.3.4.ジャイロスコープ

Clarified required sensor types and revised requirement thresholds.

7.3.5.バロメーター

Changed from MAY to SHOULD implement barometer. MUST implement and report TYPE_PRESSURE sensor.

7.3.6.温度計

Devices MAY include ambient thermometer. MAY but SHOULD NOT include CPU thermometer.

7.3.8.近接センサー

Devices that can make a voice call and indicate any value other than PHONE_TYPE_NONE in getPhoneType SHOULD include a proximity sensor.

7.4.2. IEEE 802.11 (Wi-Fi)

Android Television devices MUST include Wi-Fi support. Devices that DO support wifi must report android.hardware.wifi.

7.4.2.1. Wi-Fiダイレクト

MUST report the hardware feature android.hardware.wifi.direct.

7.4.2.2. Wi-Fi トンネル ダイレクト リンクのセットアップ

Android Television devices MUST include support for Wi-Fi TDLS.

7.5。カメラ

If a device implementation includes at least one camera, it SHOULD be possible for an application to simultaneously allocate 3 bitmaps equal to the size of the images produced by the largest-resolution camera sensor on the device.

7.5.3. External Cameras

Added requirements that device implementations with USB host mode MAY include support for an external camera.

7.5.5. Camera System Features

Added list of camera features and when they should be defined.

7.6.1.最小限のメモリとストレージ

Updated requirements for 32- and 64-bit devices. SVELTE memory requirement removed. Devices MUST have at least 1.5GB of non-volatile storage

7.6.2.アプリケーション共有ストレージ

Updated requirements for user-accessible removable storage

7.6.2.アプリケーション共有ストレージUpdated requirements that pre-installed system apps may write to secondary external storage.

7.7. USB

Removed requirements for non-charging ports being on the same edge as the micro-USB port. Updated requirements for Host and Peripheral mode.

7.7. USB

Fixing typos in the USB section.

7.8.1.オーディオ

Moved microphone section here. Added requirements for Audio Output and Audio Analog ports.

8. Performance Compatibility

Added requirements for user interface consistency.

9.5。マルチユーザーのサポート

Multi-user support feature is optional for all device types. Detailed requirements by device type in section.

9.5。マルチユーザーのサポート

SD card encryption required for the primary external storage.

9.7.カーネルのセキュリティ機能

MAY have a visible user interface when an unblocked security violation occurs resulting in a successful exploit. No permissive mode domains allowed.

9.9。 Full-Disk Encryption

Devices with a lock screen SHOULD support full-disk encryption. For new devices, full-disk encryption must be enabled out of box.

9.10 Verified boot

Added section to recommend that Device implementations support verified boot for device integrity.

10.3. Reference Applications

Removed section from CDD.

11. 更新可能なソフトウェア

If a device supports 802.11 or Bluetooth PAN (Personal Area Network) profile, then it MUST support Over-the-air download with offline update via reboot.

14. Resources

Resources moved from section 2 to section 14

13. お問い合わせ

You can join the android-compatibility forum [Resources, 109 ] and ask for clarifications or bring up any issues that you think the document does not cover.

14. Resources

1. IETF RFC2119 Requirement Levels: http://www.ietf.org/rfc/rfc2119.txt

2. Android Open Source Project: http://source.android.com/

3. Android Television features: http://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_LEANBACK

4. Android Watch feature: http://developer.android.com/reference/android/content/res/Configuration.html#UI_MODE_TYPE_WATCH

5. API 定義とドキュメント: http://developer.android.com/reference/packages.html

6. Android Permissions reference: http://developer.android.com/reference/android/Manifest.permission.html

7. android.os.Build reference: http://developer.android.com/reference/android/os/Build.html

8. Android 5.0 allowed version strings: http://source.android.com//docs/compatibility/5.0/versions

9. Telephony Provider: http://developer.android.com/reference/android/provider/Telephony.html

10. Host-based Card Emulation: http://developer.android.com/guide/topics/connectivity/nfc/hce.html

11. Android Extension Pack: http://developer.android.com/guide/topics/graphics/opengl.html#aep

12. android.webkit.WebView class: http://developer.android.com/reference/android/webkit/WebView.html

13. WebView compatibility: http://www.chromium.org/

14. HTML5: http://www.whatwg.org/specs/web-apps/current-work/multipage/

15. HTML5 offline capabilities: http://dev.w3.org/html5/spec/Overview.html#offline

16. HTML5 video tag: http://dev.w3.org/html5/spec/Overview.html#video

17. HTML5/W3C geolocation API: http://www.w3.org/TR/geolocation-API/

18. HTML5/W3C webstorage API: http://www.w3.org/TR/webstorage/

19. HTML5/W3C IndexedDB API: http://www.w3.org/TR/IndexedDB/

20. Dalvik Executable Format and bytecode specification: available in the Android source code, at dalvik/docs

21. AppWidgets: http://developer.android.com/guide/practices/ui_guidelines/widget_design.html

22. Notifications: http://developer.android.com/guide/topics/ui/notifiers/notifications.html

23. Application Resources: https://developer.android.com/guide/topics/resources/available-resources.html

24. Status Bar icon style guide: http://developer.android.com/design/style/iconography.html

25. Notifications Resources: https://developer.android.com/design/patterns/notifications.html

26. Search Manager: http://developer.android.com/reference/android/app/SearchManager.html

27. Toasts: http://developer.android.com/reference/android/widget/Toast.html

28. Themes: http://developer.android.com/guide/topics/ui/themes.html

29. R.style class: http://developer.android.com/reference/android/R.style.html

30. Material design: http://developer.android.com/reference/android/R.style.html#Theme_Material

31. Live Wallpapers: http://developer.android.com/reference/android/service/wallpaper/WallpaperService.html

32. Overview screen resources: http://developer.android.com/guide/components/recents.html

33. Screen pinning: https://developer.android.com/about/versions/android-5.0.html#ScreenPinning

34. Input methods: http://developer.android.com/guide/topics/text/creating-input-method.html

35. Media Notification: https://developer.android.com/reference/android/app/Notification.MediaStyle.html

36. Dreams: http://developer.android.com/reference/android/service/dreams/DreamService.html

37. Settings.Secure LOCATION_MODE:

http://developer.android.com/reference/android/provider/Settings.Secure.html#LOCATION_MODE

38. Unicode 6.1.0: http://www.unicode.org/versions/Unicode6.1.0/

39. Android Device Administration: http://developer.android.com/guide/topics/admin/device-admin.html

40. DevicePolicyManager reference: http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html

41. Android Device Owner App:

http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#isDeviceOwnerApp(java.lang.String)

42. Android Accessibility Service APIs: http://developer.android.com/reference/android/accessibilityservice/AccessibilityService.html

43. Android Accessibility APIs: http://developer.android.com/reference/android/view/accessibility/package-summary.html

44. Eyes Free project: http://code.google.com/p/eyes-free

45. Text-To-Speech APIs: http://developer.android.com/reference/android/speech/tts/package-summary.html

46. Television Input Framework: /devices/tv/index.html

47. Reference tool documentation (for adb, aapt, ddms, systrace): http://developer.android.com/guide/developing/tools/index.html

48. Android apk file description: http://developer.android.com/guide/components/fundamentals.html

49. Manifest files: http://developer.android.com/guide/topics/manifest/manifest-intro.html

50. Android Media Formats: http://developer.android.com/guide/appendix/media-formats.html

51. RTC Hardware Coding Requirements: http://www.webmproject.org/hardware/rtc-coding-requirements/

52. AudioEffect API: http://developer.android.com/reference/android/media/audiofx/AudioEffect.html

53. Android android.content.pm.PackageManager class and Hardware Features List:

http://developer.android.com/reference/android/content/pm/PackageManager.html

54. HTTP Live Streaming Draft Protocol: http://tools.ietf.org/html/draft-pantos-http-live-streaming-03

55. ADB: http://developer.android.com/tools/help/adb.html

56. Dumpsys: https://developer.android.com/studio/command-line/dumpsys.html

57. DDMS: http://developer.android.com/tools/debugging/ddms.html

58. Monkey testing tool: http://developer.android.com/tools/help/monkey.html

59. SysyTrace tool: http://developer.android.com/tools/help/systrace.html

60. Android Application Development-Related Settings:

http://developer.android.com/reference/android/provider/Settings.html#ACTION_APPLICATION_DEVELOPMENT_SETTINGS

61. Supporting Multiple Screens: http://developer.android.com/guide/practices/screens_support.html

62. android.util.DisplayMetrics: http://developer.android.com/reference/android/util/DisplayMetrics.html

63. RenderScript: http://developer.android.com/guide/topics/renderscript/

64. Android extension pack for OpenGL ES: https://developer.android.com/reference/android/opengl/GLES31Ext.html

65. Hardware Acceleration: http://developer.android.com/guide/topics/graphics/hardware-accel.html

66. EGL Extension-EGL_ANDROID_RECORDABLE:

http://www.khronos.org/registry/egl/extensions/ANDROID/EGL_ANDROID_recordable.txt

67. Display Manager: http://developer.android.com/reference/android/hardware/display/DisplayManager.html

68. android.content.res.Configuration: http://developer.android.com/reference/android/content/res/Configuration.html

69. Action Assist: http://developer.android.com/reference/android/content/Intent.html#ACTION_ASSIST

70. Touch Input Configuration: http://source.android.com/docs/core/interaction/input/touch-devices

71. Motion Event API: http://developer.android.com/reference/android/view/MotionEvent.html

72. Key Event API: http://developer.android.com/reference/android/view/KeyEvent.html

73. Android Open Source sensors: http://source.android.com/docs/core/interaction/sensors

74. android.hardware.SensorEvent: http://developer.android.com/reference/android/hardware/SensorEvent.html

75. Timestamp sensor event: http://developer.android.com/reference/android/hardware/SensorEvent.html#timestamp

76. Android Open Source composite sensors: http://source.android.com/devices/sensors/composite_sensors.html

77. Continuous trigger mode: http://source.android.com/devices/sensors/base_triggers.html#continuous

78. Accelerometer sensor: http://developer.android.com/reference/android/hardware/Sensor.html#TYPE_ACCELEROMETER

79. Wi-Fi Multicast API: http://developer.android.com/reference/android/net/wifi/WifiManager.MulticastLock.html

80. Wi-Fi Direct (Wi-Fi P2P): http://developer.android.com/reference/android/net/wifi/p2p/WifiP2pManager.html

81. WifiManager API: http://developer.android.com/reference/android/net/wifi/WifiManager.html

82. Bluetooth API: http://developer.android.com/reference/android/bluetooth/package-summary.html

83. Bluetooth ScanFilter API: https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html

84. NDEF Push Protocol: http://source.android.com/docs/compatibility/ndef-push-protocol.pdf

85. Android Beam: http://developer.android.com/guide/topics/connectivity/nfc/nfc.html

86. Android NFC Sharing Settings:

http://developer.android.com/reference/android/provider/Settings.html#ACTION_NFCSHARING_SETTINGS

87. NFC Connection Handover: http://www.nfc-forum.org/specs/spec_list/#conn_handover

88. Bluetooth Secure Simple Pairing Using NFC: http://members.nfc-forum.org/apps/group_public/download.php/18688/NFCForum-AD-BTSSP_1_1.pdf

89. Content Resolver: http://developer.android.com/reference/android/content/ContentResolver.html

90. Camera orientation API: http://developer.android.com/reference/android/hardware/Camera.html#setDisplayOrientation(int)

91. Camera: http://developer.android.com/reference/android/hardware/Camera.html

92. Camera: http://developer.android.com/reference/android/hardware/Camera.Parameters.html

93. Camera hardware level: https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#INFO_SUPPORTED_HARDWARE_LEVEL

94. Camera version support: http://source.android.com/docs/core/camera/versioning

95. Android DownloadManager: http://developer.android.com/reference/android/app/DownloadManager.html

96. Android File Transfer: http://www.android.com/filetransfer

97. Android Open Accessories: http://developer.android.com/guide/topics/usb/accessory.html

98. Android USB Audio: http://developer.android.com/reference/android/hardware/usb/UsbConstants.html#USB_CLASS_AUDIO

99. USB Battery Charging Specification, Revision 1.2: http://www.usb.org/developers/docs/devclass_docs/BCv1.2_070312.zip

100. USB Host API: http://developer.android.com/guide/topics/usb/host.html

101. Wired audio headset: http://source.android.com/docs/core/interaction/accessories/headset/plug-headset-spec

102. Android Security and Permissions reference: http://developer.android.com/guide/topics/security/permissions.html

103. UserManager reference: http://developer.android.com/reference/android/os/UserManager.html

104. External Storage reference: http://source.android.com/docs/core/storage

105. External Storage APIs: http://developer.android.com/reference/android/os/Environment.html

106. SMS Short Code: http://en.wikipedia.org/wiki/Short_code

107. Android Open Source Encryption: http://source.android.com/devices/tech/encryption/index.html

108. Android Compatibility Program Overview: http://source.android.com/docs/compatibility

109. Android Compatibility forum: https://groups.google.com/forum/#!forum/android-compatibility

110. WebM project: http://www.webmproject.org/

Many of these resources are derived directly or indirectly from the Android SDK, and will be functionally identical to the information in that SDK's documentation.この互換性定義または互換性テスト スイートが SDK ドキュメントと一致しない場合は、SDK ドキュメントが信頼できるものとみなされます。上記の参考文献に記載されている技術的な詳細は、この互換性定義の一部として含められるものと見なされます。