bolteu / screenshotty

A library for programatically capturing screenshots on Android
MIT License
265 stars 41 forks source link

Use PixelCopy API as the primary way to make a screenshot #1

Closed yarolegovich closed 5 years ago

yarolegovich commented 5 years ago

For API 26+ we can use PixelCopy API to copy Window into a Bitmap. The benefit is that users won't have to grant permission when we try to take a screenshot. So, on O+ let's try to take a screenshot using PixelCopy first, falling back to MediaProjection only if it fails.