|
|
@ -659,6 +659,27 @@ public class MQTTService extends Service { |
|
|
screenshotFuture = singleThreadExecutor.submit(() -> |
|
|
screenshotFuture = singleThreadExecutor.submit(() -> |
|
|
SignWayUtil.ysTakeScreenshot(path) |
|
|
SignWayUtil.ysTakeScreenshot(path) |
|
|
); |
|
|
); |
|
|
|
|
|
}else if("bv".equals(Constant.androidBoardType)){ |
|
|
|
|
|
screenshotFuture = singleThreadExecutor.submit(() ->{ |
|
|
|
|
|
try{ |
|
|
|
|
|
Bitmap screenBitmap = MyApplication.getInstance().getLztek().screenCapture(); |
|
|
|
|
|
if(screenBitmap != null){ |
|
|
|
|
|
try (FileOutputStream fos = new FileOutputStream(file)) { |
|
|
|
|
|
screenBitmap.compress(Bitmap.CompressFormat.PNG, 100, fos); |
|
|
|
|
|
fos.flush(); |
|
|
|
|
|
} catch (IOException e) { |
|
|
|
|
|
e.printStackTrace(); |
|
|
|
|
|
} |
|
|
|
|
|
if(new File(path).exists()){ |
|
|
|
|
|
LoggerUtil.e("screenShot","截屏完成"); |
|
|
|
|
|
return true; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}catch(Exception exp){ |
|
|
|
|
|
LoggerUtil.e("screenShot",exp.getMessage()); |
|
|
|
|
|
} |
|
|
|
|
|
return false; |
|
|
|
|
|
}); |
|
|
}else{ |
|
|
}else{ |
|
|
screenshotFuture = singleThreadExecutor.submit(() -> { |
|
|
screenshotFuture = singleThreadExecutor.submit(() -> { |
|
|
View decorView = MyApplication.getInstance().getCurrentActivity().getWindow().getDecorView(); |
|
|
View decorView = MyApplication.getInstance().getCurrentActivity().getWindow().getDecorView(); |
|
|
@ -708,9 +729,6 @@ public class MQTTService extends Service { |
|
|
Thread.currentThread().interrupt(); |
|
|
Thread.currentThread().interrupt(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//上传截屏
|
|
|
//上传截屏
|
|
|
|