Code to launch external app explicitly

Try something like this...

In the manifest for 'myOtherApp' use an intent filter for 'OtherAppActivity' with a company specific intent, example...

<activity
    android:name=".OtherAppActivity"
    android:label="@string/app_name" >
    <intent-filter>
        <action android:name="com.mycompany.DO_SOMETHING" />
    </intent-filter>
</activity>

Then, in the 'calling' app, use...

Intent intent = new Intent();
intent.setAction("com.mycompany.DO_SOMETHING");
context.startActivity(intent);

I had this problem and searched for hours looking for a solution. Finally found it: http://www.krvarma.com/2010/08/launching-external-applications-in-android. That link shows how to use the package manager to launch any application for which you have simply the package name:

PackageManager pm = this.getPackageManager();

try
{
  Intent it = pm.getLaunchIntentForPackage(sName);

  if (null != it)
    this.startActivity(it);
}

catch (ActivityNotFoundException e)
{
}

You need to specify the fully qualified class name in the second parameter of new ComponentName like this:

ComponentName cn = new ComponentName("com.myOtherApp", "com.myOtherApp.OtherAppActivity");

I think this is because the package name in the manifest and the activity name don't necessarily have to have the same package path, so the new ComponentName call doesn't infer the class name second parameter is prefixed by the package name first parameter.