I want one sample code for startActivityForResult(). Please explain how it works?
Look at this documentation. You will get the result in onActivityResult() method.