Android三種方式截取任意界面屏幕

1、使用MediaProjectionManagerandroid Android5.0以後,開放截取屏幕的API,也就是利用MediaProjectionManager建立VirtualDisplay,傳入與ImageReader關聯的Surface,這樣就能夠從ImageReader中獲取到Image,而後把Image的像素數組拷貝到Bitmap,若是要保存爲圖片,就用獲得的Bitmap壓縮爲
相關文章
相關標籤/搜索