mtsahakis / MediaProjectionDemo

One Activity sample app of using Android Lollipop MediaProjection API to capture device screenshots
Other
210 stars 76 forks source link

White Bitmap on some devices #19

Open kobidy1102 opened 5 years ago

kobidy1102 commented 5 years ago

I have a product for screen capture feature. I have received errors on some devices with unknown causes. Bitmap received no data, it's white. Especially when turning on screen recording mode on the phone, it works (data bitmap has data). I want to take a screenshot in a service. I do not want it to require the "App want recording screen" permission many times, Should have saved the resultCode and Data data for the first time and used them. On my device, it works well. The Error was on: Asus zenfone max pro m1-android 9, Xiaomi redmi note 5- android 9. (Screenshot 2 still works; 1,3,4 fail). Please tell me the reason and how to fix it. Here is my sample: https://github.com/kobidy1102/ScreenShot.git