tags:

views:

34

answers:

2

My question is, is it possible to call one app from another? It would be very helpful if anyone had an answer or solution.

-Chris-

A: 

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.

hgpc
Thanks, do i have to set special permissions or instrumentations inside the manifest?
Christian
Or, is it possible to put the hole app inside the other app?
Christian
You don't need special permissions to use intents. You can have more than one component in one app, but whole apps cannot be contained inside other apps.
hgpc
okay, thank you.
Christian
You're welcome. Don't forget to accept an answer by clicking on the check box outline to its left.
hgpc
A: 

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.

Rodrigo Gama
Thats the first place I looked. It wasn't much help. Hard to understand. thanks for the help though.
Christian