How to get the page source of webpage in hybrid android app ? and how to locate an ID?

For switching between context you need to use Appium java client bindings.

driver.context("the web view context you wish to switch");

Refer this thread.