You can also use the method for this. Thia is not recommended, but the code below may be useful to you.
public void launchActivityCurrent() {
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_LAUNCHER);
System.out.println("Inside Launch Activity current");
intent.setClassName("YourpackageName","Activity you want to launch");
For ex:
intent.setClassName("com.android.mms","com.android.mms.ui.ConversationList");
Context c = currentContext();
c.startActivity(intent);
}
I use robotium and I do not call the toolkit again, so I use this method to run in application activity. I hope this is also useful for you.
user1801972
source
share