How to switch from native Android app to Chrome window

I am currently automating an Android app in Genymotion in which clicking a link in the app launches a Chrome browser. How do I switch to that already opened Chrome window to continue my automation in that Chrome window like typing in the textbox, etc. Also I need to know how to switch back too the native app.
My app is launched by the following code:

AppiumDriver driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);