ANDROID开发文档翻译

============问题描述============



麻烦谁能准确地翻译这几段话。
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============


翻译得不错,不过感觉还是有点和汉语的表达方式不一样。

转载于:https://www.cnblogs.com/hugangyan86/p/4042021.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值