Added intent function in Main Activity