tags:

views:

21

answers:

1

Hi, Can I call nested activities in Android? I have 3 activities. In first activity there are a list of options like ice cream, chocolate etc. When I am selecting one option (through button), I will go to second activity. Here I will enter the quanity for each option. I want to save these option value and quantity, and display the result either in first activity or third activity. How can I do that? startActivity(intent) is working fine when I call the second acitivity. but when I am calling the third activity through startActivity(intent), the process is suddently killed. Please help me.. Thank you.

A: 

What do you mean by "nested" activities?
When is your process "suddenly killed"? When calling Activity3 from Activity2 (after that one was called from Activity1) or after calling Activity3 from Activity1?
Do you get an exception?
... I guess you should provide more information before anyone can really find out what's wrong. It would also help if you posted some sample code.

Have you tried startActivityForResult see how an activity ended? Also, you can use "extras" to pass variables between activities.

http://developer.android.com/reference/android/app/Activity.html#startActivityForResult%28android.content.Intent,%20int%29

http://www.anddev.org/passing_and_recieveing_values_between_activities-t637.html

Select0r