- 構文:
<uses-configuration android:reqFiveWayNav=["true" | "false"] android:reqHardKeyboard=["true" | "false"] android:reqKeyboardType=["undefined" | "nokeys" | "qwerty" | "twelvekey"] android:reqNavigation=["undefined" | "nonav" | "dpad" | "trackball" | "wheel"] android:reqTouchScreen=["undefined" | "notouch" | "stylus" | "finger"] />
- 上位の要素:
<manifest>
- 説明:
アプリに必要なハードウェアとソフトウェアの機能を指定します。 たとえば、物理キーボードや特定のナビゲーション デバイス(トラックボールなど)が必要なことをアプリで指定する場合があります。この要素は、アプリが動作しないデバイスにアプリがインストールされないようにするために使用します。
注: 通常のアプリでは、このマニフェスト タグは使用しません。目の不自由なユーザーを支援するために、十字キー(D-pad)による入力を必ずサポートしてください。また、タップに加えて(あるいはタップの代わりに)D-pad による入力が可能なデバイスをサポートしてください。
D-pad による入力をアプリでサポートする方法については、コントローラの操作を処理するをご覧ください。タッチスクリーンなしではアプリが動作できない場合は、代わりに
<uses-feature>
タグを使用して、必要なタッチスクリーンのタイプ(基本的なタップスタイルのイベント用の"android.hardware.faketouch"
や、複数の指による入力用の"android.hardware.touchscreen.multitouch.jazzhand"
のようなより高度なタップタイプなど)を宣言します。- 属性:
android:reqFiveWayNav
- アプリで 5 方向ナビゲーション コントロールが必要かどうかを指定します。必要な場合は
"true"
、必要でない場合は"false"
です。5 方向コントロールは、選択を上下左右に移動でき、現在の選択を確定することもできるコントロールです。十字キー(D-pad)、トラックボールなどのデバイスを使用できます。アプリで方向コントロールが必要なものの、特定のタイプのコントロールは必要でない場合は、この属性を
"true"
に設定してreqNavigation
属性を無視できます。ただし、特定のタイプの方向コントロールが必要な場合は、この属性を無視して、代わりにreqNavigation
を設定できます。 android:reqHardKeyboard
- アプリがハードウェア キーボードを必要とするかどうかを指定します。必要な場合は
"true"
、必要でない場合は"false"
です。 android:reqKeyboardType
- アプリで必要なキーボードのタイプ(存在する場合)。この属性は、ハードウェア キーボードとソフトウェア キーボードを区別しません。特定のタイプのハードウェア キーボードが必要な場合は、この属性でタイプを指定します。また、
reqHardKeyboard
属性を"true"
に設定します。値には次のいずれかの文字列を指定する必要があります。
値 説明 「 undefined
」アプリでキーボードが不要。 キーボードの要件が定義されていない。 これがデフォルト値です。 「 nokeys
」アプリでキーボードが不要。 「 qwerty
」アプリで標準の QWERTY キーボードが必要。 「 twelvekey
」ほとんどの電話に搭載されているような、 0
~9
の数字キー、*
キー、#
キーからなる 12 キーのキーパッドがアプリで必要。 android:reqNavigation
- アプリで必要なナビゲーション デバイス(存在する場合)。値には次のいずれかの文字列を指定する必要があります。
値 説明 「 undefined
」アプリでどのタイプのナビゲーション コントロールも不要。 ナビゲーションの要件が定義されていない。 これがデフォルト値です。 「 nonav
」アプリでナビゲーション コントロールが不要。 「 dpad
」アプリでナビゲーション用の D-pad が必要。 「 trackball
」アプリでナビゲーション用のトラックボールが必要。 「 wheel
」アプリでナビゲーション ホイールが必要。 アプリでナビゲーション コントロールが必要なものの、その正確なタイプは重要でない場合は、この属性を設定する代わりに、
reqFiveWayNav
属性を"true"
に設定します。 android:reqTouchScreen
- アプリで必要なタッチ スクリーンのタイプ(存在する場合)。値には次のいずれかの文字列を指定する必要があります。
値 説明 「 undefined
」アプリでタッチ スクリーンが不要。タッチ スクリーンの要件が定義されていない。これがデフォルト値です。 「 notouch
」アプリでタッチ スクリーンが不要。 「 stylus
」アプリで、タッチペンによって操作できるタッチ スクリーンが必要。 「 finger
」アプリで、指によって操作できるタッチ スクリーンが必要。 注: アプリでなんらかのタップ入力が必要な場合は、
<uses-feature>
タグを使用して必要なタッチスクリーンのタイプ(基本的なタップスタイルのイベントの場合は"android.hardware.faketouch"
で始まります)を宣言してください。
- 導入時の API レベル:
- API レベル 3
- 関連項目:
<uses-configuration>
このページのコンテンツやコードサンプルは、コンテンツ ライセンスに記載のライセンスに従います。Java および OpenJDK は Oracle および関連会社の商標または登録商標です。
最終更新日 2025-07-27 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-07-27 UTC。"],[],[],null,["# <uses-configuration\u003e\n\nsyntax:\n:\n\n ```xml\n \u003cuses-configuration\n android:reqFiveWayNav=[\"true\" | \"false\"]\n android:reqHardKeyboard=[\"true\" | \"false\"]\n android:reqKeyboardType=[\"undefined\" | \"nokeys\" | \"qwerty\" | \"twelvekey\"]\n android:reqNavigation=[\"undefined\" | \"nonav\" | \"dpad\" | \"trackball\" | \"wheel\"]\n android:reqTouchScreen=[\"undefined\" | \"notouch\" | \"stylus\" | \"finger\"] /\u003e\n ```\n\ncontained in:\n: [\u003cmanifest\u003e](/guide/topics/manifest/manifest-element)\n\ndescription:\n\n: Indicates the hardware and software features the application requires.\n For example, an application might specify that it requires a physical keyboard\n or a particular navigation device, like a trackball. The specification is\n used to avoid installing the application on devices where it doesn't work.\n\n **Note:** Most apps don't use this manifest tag.\n *Always* support input with a directional pad (D-pad) to assist sight-impaired\n users and support devices that provide D-pad input in addition to or instead of touch.\n\n For\n information about how to support D-pad input in your app, read [Handle controller actions](/develop/ui/views/touch-and-input/game-controllers/controller-input). If\n your app absolutely can't function without a touchscreen, then instead use the [`\u003cuses-feature\u003e`](/guide/topics/manifest/uses-feature-element) tag to\n declare the required touchscreen type, ranging from `\"android.hardware.faketouch\"` for basic\n touch-style events to more advanced touch types such as `\"android.hardware.touchscreen.multitouch.jazzhand\"` for distinct input from multiple fingers.\n\nattributes:\n:\n\n `android:reqFiveWayNav`\n : Whether the application requires a five-way navigation control. It's\n `\"true\"` if it does, and `\"false\"` if not. A five-way\n control is one that can move the selection up, down, right, or left, and\n also provides a way of invoking the current selection. It can be a\n directional pad (D-pad), trackball, or other device.\n\n\n If an application requires a directional control, but not a control of a\n particular type, it can set this attribute to `\"true\"` and ignore\n the [reqNavigation](#nav) attribute. However,\n if it requires a particular type of directional control, it can ignore\n this attribute and set `reqNavigation` instead.\n\n `android:reqHardKeyboard`\n : Whether the application requires a hardware keyboard. It's\n `\"true\"` if it does, and `\"false\"` if not.\n\n `android:reqKeyboardType`\n : The type of keyboard the application requires, if any.\n This attribute doesn't distinguish between hardware and software\n keyboards. If a hardware keyboard of a certain type is required,\n specify the type here and also set the `reqHardKeyboard` attribute\n to `\"true\"`.\n\n\n The value must be one of the following strings:\n\n\n | Value | Description |\n |---------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|\n | \"`undefined`\" | The application doesn't require a keyboard. A keyboard requirement isn't defined. This is the default value. |\n | \"`nokeys`\" | The application doesn't require a keyboard. |\n | \"`qwerty`\" | The application requires a standard QWERTY keyboard. |\n | \"`twelvekey`\" | The application requires a twelve-key keypad, like those on most phones, with keys for the digits from `0` through `9`, plus star (`*`) and pound (`#`) keys. |\n\n `android:reqNavigation`\n : The navigation device required by the application, if any. The value\n must be one of the following strings:\n\n | Value | Description |\n |---------------|--------------------------------------------------------------------------------------------------------------------------------------|\n | \"`undefined`\" | The application doesn't require any type of navigation control. The navigation requirement isn't defined. This is the default value. |\n | \"`nonav`\" | The application doesn't require a navigation control. |\n | \"`dpad`\" | The application requires a D-pad for navigation. |\n | \"`trackball`\" | The application requires a trackball for navigation. |\n | \"`wheel`\" | The application requires a navigation wheel. |\n\n\n If an application requires a navigational control, but the exact type of\n control doesn't matter, it can set the\n [reqFiveWayNav](#five) attribute to `\"true\"`\n rather than setting this one.\n\n `android:reqTouchScreen`\n : The type of touch screen the application requires, if any.\n The value must be one of the following strings:\n\n | Value | Description |\n |---------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n | \"`undefined`\" | The application doesn't require a touch screen. The touch screen requirement is undefined. This is the default value. |\n | \"`notouch`\" | The application doesn't require a touch screen. |\n | \"`stylus`\" | The application requires a touch screen that is operated with a stylus. |\n | \"`finger`\" | The application requires a touch screen that is operated with a finger. **Note:** If some type of touch input is required for your app, instead use the [`\u003cuses-feature\u003e`](/guide/topics/manifest/uses-feature-element) tag to declare the required touchscreen type, beginning with `\"android.hardware.faketouch\"` for basic touch-style events. |\n\nintroduced in:\n: API level 3\n\nsee also:\n:\n - [configChanges](/guide/topics/manifest/activity-element#config) attribute of the [\u003cactivity\u003e](/guide/topics/manifest/activity-element) element\n - [ConfigurationInfo](/reference/android/content/pm/ConfigurationInfo)"]]