This is a simple piece of code to explain the explicit intent with two activity(two screens).Each activity has two button , when we a click a button in activity1 it will navigate to activity2 and when we click the button in activity 2 it will switch back to activity1.