1

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-

hpique
  • 119,096
  • 131
  • 338
  • 476
Christian
  • 958
  • 5
  • 23
  • 52
  • Or like linking two apps to eachother? – Christian Aug 18 '10 at 19:01
  • possible duplicate of [How to call one android application from another android application](http://stackoverflow.com/questions/2728465/how-to-call-one-android-application-from-another-android-application) – Gangnus Jan 30 '14 at 11:03

2 Answers2

2

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.

hpique
  • 119,096
  • 131
  • 338
  • 476
  • Thanks, do i have to set special permissions or instrumentations inside the manifest? – Christian Aug 20 '10 at 13:24
  • Or, is it possible to put the hole app inside the other app? – Christian Aug 20 '10 at 13:36
  • 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. – hpique Aug 20 '10 at 14:33
  • You're welcome. Don't forget to accept an answer by clicking on the check box outline to its left. – hpique Aug 22 '10 at 19:40
0

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
  • 1,092
  • 2
  • 13
  • 23