標籤:android io ar os sp for 檔案 on 問題
============問題描述============
麻煩誰能準確地翻譯這幾段話。
The way the system identifies the components that can respond to an intent is by comparing the intent received to the intent filters provided in the manifest file of other apps on the device.
When you declare an activity in your app‘s manifest, you can optionally include intent filters that declare the capabilities of the activity so it can respond to intents from other apps. You can declare an intent filter for your component by adding an <intent-filter> element as a child of the component‘s declaration element.
For example, if you‘ve built an email app with an activity for composing a new email, you can declare an intent filter to respond to "send" intents (in order to send a new email) like this:
============解決方案1============
系統識別能響應intent的components的方法是,將接收到的intent與裝置上其它app的manifest檔案中提供的intent過濾器作比較。
當你在你的app的manifest檔案中聲明一個activity時,你可以選擇性地包含intent過濾器,這些過濾器聲明了這個activity的相容性,所以它可以響應從別的app接收到的intent。你可以為你的component聲明一個intent過濾器,方法是在聲明component標籤的子標籤處添加<intent-filter>。
舉個例子,如果你作了一個email的app,這個app有一個寫郵件的activity,你可以聲明一個intent過濾器來響應“發送”intent(為了發送新郵件)像這樣:
============解決方案2============
翻譯得不錯,不過感覺還是有點和漢語的表達方式不一樣。
ANDROID開發文檔翻譯