views:

156

answers:

1

I need to replace the current activity with a new one. That is, I want to start a new activity and remove the current activity from the task stack.

Based on the documentation, it seems the best way would be to start the activity using Activity.startActivity as per usual, and then call Activity.finish immediately to close the current activity.

Is this a valid usage of these APIs or should I be doing something else?

+4  A: 

Yes. It is fine to use api this way.

Tushar