I have tried all the examples in SO and they do not work for me. I wish to start a specific class in another application (not main) from inside my application.
I can start the application main page with this code (this works but not the class I want):
Intent LaunchIntent = getPackageManager().getLaunchIntentForPackage("com.paloaltophoto.starttimer");
startActivity(LaunchIntent);
But when I follow the examples from other SO answers to try and get to the class I want, I get an error
public void onTest(View v){
Intent intent = new Intent();
intent.setComponent(new ComponentName("com.paloaltophoto.starttimer", "com.paloaltophoto.starttimer.edit"));
startActivity(intent);
}
I get a message about com.paloaltophoto.starttimer/com.paloaltophoto.starttimer.edit not being declared in my manifest but the manifest has this code:
<activity android:name="com.paloaltophoto.starttimer.edit">
</activity>
Everything complies fine. Obviously the other application allows me to launch it as I can start it just fine on the main page but I can't find any reference on how I should make this work for a specific class.