This piece code explains how to pass data from one activity to another activity.