Use below function to capture screen shot of android application using Appium.
// capturing screenshot
public void captureScreenshot(String fileName) {
try {
FileOutputStream out = new
FileOutputStream( fileName + ".jpg");
out.write(((TakesScreenshot)
driver)
.getScreenshotAs(OutputType.BYTES));
out.close();
} catch (Exception e) { }
}