With the MediaProjection APIs available in Android L it\'s possible to
MediaProjection
capture the contents of the main screen (the default display) int
ImageReader is the class you want.
ImageReader
https://developer.android.com/reference/android/media/ImageReader.html