打开Android中一个CaclulatorAndroid、Caclulator

由网友(習慣性赖着你)分享简介:我希望从我的活动中打开一个计算器。这是我的code,现在,它的工作原理:I'm looking to open a calculator from within my Activity. Here's my code right now and it works:Intent i = new Intent();...

我希望从我的活动中打开一个计算器。这是我的code,现在,它的工作原理:

I'm looking to open a calculator from within my Activity. Here's my code right now and it works:

Intent i = new Intent();
i.setClassName("com.android.calculator2",
"com.android.calculator2.Calculator");

我想使这是一个隐式调用,因为我不知道什么计算器使用想用,我想离开这个选项打开从计算器,该机器人1显然没有按接收值做T。我一直没能找到怎样的问题需要一个类型的应用程序的一个很好的例子。

I would like to make this an implicit call because I don't know what calculator the use would like to use and I would like to leave the option open to receive a value from the calculator, which the android one apparently doesn't do. I haven't been able to find a good example of how to implicitly ask for a type of application.

我已经看了 http://www.openintents.org/en/intentstable 但我想我不完全了解如何使用该网站。

I've looked at http://www.openintents.org/en/intentstable but I guess I don't completely understand how to use that site.

我想我明白意图的意图,但也许我只是没有牢固掌握如何使用它们。任何帮助将是非常美联社preciated。

I think I understand the intent of intents, but maybe I just don't have a firm grasp on how to use them. Any help would be very appreciated.

推荐答案

你有什么可能是最好的,你可以做。我刚检查了AndroidManifest.xml中的 com.android.calculator2.Calculator ,它不听任何其他意图。

What you have is probably the best you can do. I just checked the AndroidManifest.xml for com.android.calculator2.Calculator and it doesn't listen for any other intents.

阅读全文

相关推荐

最新文章