As we know, startActivityForResult()
used to get a result for a task from parent activity. Here when we click the setResult()
. It returns the result to the parent Activity.
Child Activity means it should maintain the persistent state. That is when the users clicks a button on the child activity. It do not finishes that activity and show the Parent Activity. And again i may go to the child activity from parent activity. If the child does not exists it starts a new child activity else it should show the existing child activity with persistent content.
Edit:
Simply said, my parent Activity starts a new Child Activity. Now both Activities should be alive. How to call the Parent Activity without finishing the child Activity(in other words, How to BringtoFront the parent Activity)? For this scenario,
- you can not use
startActivity()
. Because it creates a new Activity Instance. Not Existing Parent Activity - you can not use
startActivityForResult()
. Because it finishes the child Activity Instance.
Is that possible in Android? Any Idea?