I have two activities from two different packages, I wish to call an activity in Package2 from package1 To do so i used the following,
Intent intentDeviceTest = new Intent();
intentDeviceTest.setComponent(new ComponentName("chat.client.gui","chat.client.gui.MainActivity"));
startActivity(intentDeviceTest);
This shows an error that the activity is not found, add this to manifest.
But it works fine when i call it in this way,
Intent intentDeviceTest = new Intent(HomeActivity.this,MainActivity.class);
startActivity(intentDeviceTest);
Whats the mistake in the above method!