- 構文:
<action android:name="string" />
- 上位の要素:
<intent-filter>
- 説明:
- インテント フィルタにアクションを追加します。
<intent-filter>
要素には、1 つまたは複数の <action>
要素が含まれている必要があります。インテント フィルタ内に <action>
要素が存在しない場合、フィルタは Intent
オブジェクトを受け入れません。インテント フィルタの詳細やフィルタ内におけるアクション指定の役割については、インテントとインテント フィルタをご覧ください。
- 属性:
android:name
- アクションの名前。一部の標準アクションは、
Intent
クラス内で ACTION_string
定数として定義されています。対象アクションの 1 つをこの属性に割り当てるには、ACTION_
の後ろにある string
の前に「android.intent.action.
」を付加します。たとえば、ACTION_MAIN
の場合は「android.intent.action.MAIN
」を使用し、ACTION_WEB_SEARCH
の場合は「android.intent.action.WEB_SEARCH
」を使用します。
アクションを定義する際は、必ず一意になるように、アプリのパッケージ名をプレフィックスとして使用することをおすすめします。たとえば、TRANSMOGRIFY
アクションの場合は次のように指定します。
<action android:name="com.example.project.TRANSMOGRIFY" />
- 導入時の API レベル:
- API レベル 1
- 関連項目:
<intent-filter>
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2022-02-22 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"必要な情報がない"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"複雑すぎる / 手順が多すぎる"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"最新ではない"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻訳に関する問題"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"サンプル / コードに問題がある"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"その他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"わかりやすい"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"問題の解決に役立った"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"その他"
}]