如何导航 android 文档以获取特定意图?

发布于 2024-11-10 05:14:03 字数 425 浏览 0 评论 0原文

我已经使用 Flex 几年了,但我对 Android 还很陌生。我了解活动、接收者和服务。

我需要一些与 android 文档中的导航相关的帮助。

我如何在文档中找到与特定类相关的被触发的意图以及该特定意图的详细信息。

让我举个例子来澄清我的问题。 我想知道如何收到新短信。我知道我必须监听广播接收器中的某些意图,并且必须在清单文件中添加一些权限。我查阅了文档并在 android.telephony.SmsManager 中查找了一些意图,但我无法找到它。 因此,通过在网上搜索,我发现“android.provider.Telephony.SMS_RECEIVED”是我将在广播接收器中收到的意图。 如何在 android 文档中找到有关此特定事件的详细信息? 这个意图包含什么,谁触发的?捆绑包中包含什么?

我认为意图与 Flex 中的事件类似。这种理解正确吗?

I have been using flex for couple of years but I am new to android. I know about activities, receivers and services.

I need some help related to navigation in android doc.

How can I find out in documentation about the intents being fired related to a particular class and what are the details of that particular intent.

Let me clarify my question by giving you an example.
I wanted to know how can I receive a new sms. I knew that I have to listen for some intent in a broadcast receiver and some permissions have to be added in manifest file. I went to the docs and looked for some intent in android.telephony.SmsManager but I was unable to find it.
So by searching on the net I found that "android.provider.Telephony.SMS_RECEIVED" is the intent which I will receive in broadcast receiver.
How can I find the detail about this particular event in android docs?
What this intent contains, who fires this? What is contained in the bundle?

I think intents are similar to events in flex. Is this understanding correct?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不离久伴 2024-11-17 05:14:03

我如何在文档中找到与特定类相关的被触发的意图以及该特定意图的详细信息。

意图并不真正“与特定类别相关”。特定 Intent 操作的详细信息记录在该操作中。要查找记录操作的位置,请在 http://developer.android.com 中搜索其名称。

我想知道如何收到新短信。
...
我如何在 android 文档中找到有关此特定事件的详细信息?这个意图包含什么,谁触发的?捆绑包中包含什么?

从技术上讲,这是没有文档记录的,不应使用。实际上,它的使用是如此广泛,以至于谷歌如果想要改变它的行为,那简直就是疯了。但是,您找不到有关此主题的官方文档。

我认为意图与 Flex 中的事件类似。这种理解正确吗?

就它们都涉及计算机而言,是的,它们是相似的。 :-)

我使用 Flex 已经有几年了,但是 IIRC、Flex 事件更接近 Android 小部件侦听器(例如,setOnClickListener())。

How can i find out in documentation about the intents being fired related to a particular class and what are the details of that particular intent.

Intents are not really "related to a particular class". Details of a particular Intent action are documented on that action. To find where the action is documented, search on its name in http://developer.android.com.

I wanted to know how can i receive a new sms.
...
How can i find the detail about this particular event in android docs? What this intent contains, who fires this? What is contained in the bundle?

Technically speaking, this is undocumented and should not be used. In practice, it is so widely used that Google would be insane to change its behavior. However, you will not find official documentation on this subject.

I think intents are similar to events in flex. Is this understanding correct?

Insofar as they both involve computers, yes, they are similar. :-)

It has been a few years since I used Flex, but IIRC, Flex events are closer to Android widget listeners (e.g., setOnClickListener()).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文