I have two activities. The first activity display list of the users with short info. And after select some user I go to the second activity for display full info about this user. For send event I used startActivityForResult(); for receive event in socond activity and added public void onActivityResult(int requestCode, int resultCode, Intent data). After start project I send intend from first activity and I do not receive in the second :(. How I can receive sent event in second activity?
Thank you…
I have two activities. The first activity display list of the users with short
Share
You implement onActivityResult in the first activity in order to get the result from the sub-activity you’ve started. In your sub-activity you receive the event in the onCreate method:
I recommend that you have a look at the Notepad sample to see how things work. startActivityForResult may not be needed – startActivity should be enough. You usually don’t return something from the item view to the list view.