hap497
hap497

Reputation: 162985

how can I launch an activity directly from my activity

In my android project, I have 2 Activities. How can I launch an Activity from an Activity. I know I can do 'startActivity', but my activity has NOT registered for any Intent, is there anyway I can still launch it from my activity?

Thank you.

Upvotes: 1

Views: 626

Answers (2)

Prakhs
Prakhs

Reputation: 579

startActivity(new Intent(this, MyOtherActivity.class));

or

startActivityForResult(intent, requestCode)

Upvotes: 1

CommonsWare
CommonsWare

Reputation: 1006674

startActivity(new Intent(this, MyOtherActivity.class));

Upvotes: 5

Related Questions