什么是意图在Android的? [英] What is Intent in Android?

查看:125
本文介绍了什么是意图在Android的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  • 什么是的意图的Andr​​oid中?
  • 可以用一个例子有人详细点吗?
  • 什么是它的类型,以及为什么我们在Android中使用它?
  • 为什么在Android中如此重要?
  • What is Intent in Android?
  • Can someone elaborate with an example?
  • What are the types of it, and why we are using it in Android?
  • Why is it so important in Android?

推荐答案

这是意图正是其描述。这是一个用心做一个动作。

An Intent is exactly what it describes. It's an "intention" to do an action.

这是意图基本上是一个消息,说你做了或想要的东西发生。根据不同的目的,应用程式或操作系统可能会被监听,并会做出相应的反应。

An Intent is basically a message to say you did or want something to happen. Depending on the intent, apps or the OS might be listening for it and will react accordingly.

把它看成是一个爆炸电子邮件给一帮朋友,在你告诉你的朋友约翰做一些事情。其他人会忽视的电子邮件,但约翰会做出反应。

Think of it as a blast email to a bunch of friends, in which you tell your friend John to do something. The other folks will ignore the email, but John will react to it.

要监听一个意图(如电话铃声,或收到短信),您将实现广播接收器。

To listen for an intent (like the phone ringing, or an SMS is received), you implement a broadcast receiver.

,你火了一个意图说你会的。

If you want to fire off an intent to do something, like pop up the dialer, you fire off an intent saying you will.

<一个href="http://www.vogella.de/articles/AndroidIntent/article.html">http://www.vogella.de/articles/AndroidIntent/article.html

这篇关于什么是意图在Android的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆