Join us on the livestream at Android Dev Summit on 7-8 November 2018, starting at 10AM PDT!
added in API level 21

android.media.projection

Classes

MediaProjection A token granting applications the ability to capture screen contents and/or record system audio. 
MediaProjection.Callback Callbacks for the projection session. 
MediaProjectionManager Manages the retrieval of certain types of MediaProjection tokens.