Android:如何使用谷歌语音启动通话意图?

时间:2012-01-30 05:45:47

标签: java android

如何使用谷歌语音启动特定意图(如通话)?如何使用意图传递电话号码?以下代码启动谷歌语音,但使用谷歌语音作为意图额外的呼叫传递什么值?

final Intent intent = new Intent();
intent.setComponent(new ComponentName("com.google.android.apps.googlevoice", "com.google.android.apps.googlevoice.activity.conversationlist.ConversationListActivity"));

intent.putExtra("label", "<phone number>");

startActivity(intent);

我应该在标签中添加什么来启动使用谷歌语音发起呼叫的意图? 任何帮助表示赞赏...在此先感谢...

1 个答案:

答案 0 :(得分:1)

永远不要直接瞄准应用程序,除非它在你的包中。您应该使用Intent过滤器来捕获该特定应用程序。有时您必须针对这样的应用程序,但这会带来更改包名称错误的风险。

要处理您的特定应用,您需要了解如何将信息传递到Google语音。这将为您提供洞察力以及如何定位没有定位确切的包名称。