Google Android开发者文档系列-与其他应用程序交互(序言)

来源:互联网 发布:大数据的发展综述 编辑:程序博客网 时间:2024/06/10 21:56

Interacting with Other Apps(与其他应用程序交互)

该系列文章是我在学习Google开发者文档时结合谷歌翻译和自身理解编写的,希望对学习Android开发的朋友带来些便利,由于个人翻译水平有限,所以内容包含原文和译文,希望浏览者结合理解,以免步入我可能错译的误区。在此感谢http://android.xsoftlab.net/提供的镜像,希望转载者注明出处http://blog.csdn.net/u014031072/article/details/51540033方便查看最新博客

An Android app typically has several activities. Each activity displays a user interface that allows the user to perform a specific task (such as view a map or take a photo). To take the user from one activity to another, your app must use an Intent to define your app’s “intent” to do something. When you pass an Intent to the system with a method such as startActivity(), the system uses the Intent to identify and start the appropriate app component. Using intents even allows your app to start an activity that is contained in a separate app.
Android应用通常有多个活动。每个活动显示一个用户界面,允许用户执行特定的任务(例如查看地图或拍照)。为了使用户从一个活动跳转到另一个活动,您的应用程序必须使用一个Intent来定义你的应用程序的“意图”。当你传递一个Intent到系统时,如startActivity()的方法,该系统会根意图去识别并启动相应的应用程序组件。使用意图甚至可以让你的应用程序启动包含在其它应用程序中的活动。

An Intent can be explicit in order to start a specific component (a specific Activity instance) or implicit in order to start any component that can handle the intended action (such as “capture a photo”).
一个意图可以明确的启动特定的组件(具体活动实例),也可以含蓄的启动可处理预期的动作(如“拍摄照片”)的任何组件。

This class shows you how to use an Intent to perform some basic interactions with other apps, such as start another app, receive a result from that app, and make your app able to respond to intents from other apps.
本课程将向您展示如何使用intent来与其他应用程序进行交互,如启动另一个应用程序、从那个应用程序收到一个返回结果、使您的应用程序能够回应其他应用程序发出的intent等。

0 0
原创粉丝点击