Get the text on the screen as part of Android UI automation

Is there any way to get the text displayed on the screen using appium.

getText();
getAttributeValue(“content-desc”);