How to properly take a screenshot, globally?
问题 Background Since Android API 21, it's possible for apps to take screenshots globally and record the screen. The problem I've made a sample code out of all I've found on the Internet, but it has a few issues: It's quite slow. Maybe it's possible to avoid it, at least for multiple screenshots, by avoiding the notification of it being removed till really not needed. It has black margins on left and right, meaning something might be wrong with the calculations : What I've tried MainActivity.java