My question is, is it possible to call one app from ano开发者_Python百科ther? It would be very helpful if anyone had an answer or solution.
-Chris-
Yes, by using intents.
For example:
final Intent intent = new Intent();
intent.setAction(Intent.ACTION_MAIN);
intent.setClassName("com.example.theotherapp", "com.example.theotherapp.MainActivity");
startActivity(intent);
This is called an explicit intent, because you're explicitly stating which component should respond to it. You can also use implicit intents, in which you specify what kind of component you expect and the OS and/or the user selects the most appropriate one.
If you can choose, implicit intents are preferred.
You should take a look at http://developer.android.com/guide/topics/fundamentals.html, more specifically at the "Application Components" section.
There are many ways to make two applications talk to each other - and they're explained there.
精彩评论