【问题标题】:What's the relationship between the Activity ,Action and Intent in Android?Android中的Activity、Action和Intent是什么关系?
【发布时间】:2016-03-25 14:44:02
【问题描述】:

我对 Activity、Action 和 Intent 之间的关系感到困惑?

还有一个关于Implicit intents的问题:例如我想开始这个动作ACTION_CALL打电话,显然这是一个隐式意图,所以我应该这样写Intent intent = new Intent(); intent.setAction(Intent.ACTION_CALL);

但我还需要设置数据。这是我的问题:我怎么知道 uri 是什么样的?架构是什么?请不要说出简单的答案。你怎么知道的?我应该寻找任何API吗?我知道在清单<data android:scheme="xxxxx"/> 那么关于动作或活动Intent.ACTION_CALL 的清单在哪里?没找到。

【问题讨论】:

标签: android android-intent


【解决方案1】:

活动 - 它表示您要从哪里发送消息,例如:从活动 A 到活动 B。

Action - 它说明了这条消息的含义,例如:在 webview 中打开 URL 或拨打电话等。

Intent - 它表示如何传输消息和其他额外信息,例如:直接通过显式 Intent 或通过隐式 Intent 从多个选项中选择间接传输。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-05-12
    • 1970-01-01
    • 1970-01-01
    • 2015-05-09
    • 1970-01-01
    • 2012-10-04
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多