I'm simply trying to launch one of my apps from within another app. I have this code:
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.setComponent(new ComponentName("com.my.app","com.my.app.Main"));
startActivity(intent);
But it keeps giving me this error:
Unable to find explicit activity class {com.my.app/com.my.app.Main}; have you declared this activity in your AndroidManifest.xml?
Which manifest is it referring to? The second app that I'm trying to launch, or the app from which I'm trying to launch it? Also, what am I supposed to be declaring exactly?
If you need more information, please let me know. It's probably something simple but I've looked through all the related questions / answers on SO and none of the solutions worked for me.
Thanks!