【发布时间】:2016-06-08 07:46:50
【问题描述】:
我的黑屏不是视频内容,请帮帮我。
我的代码:
private Bitmap takeScreenshot() {
relate.setDrawingCacheEnabled(true);
relate.buildDrawingCache();
return relate.getDrawingCache();
}
private void saveBitmap(Bitmap bitmap) {
// File imagePath = new File(Environment.getExternalStorageDirectory() + "/screenshot.png");
FileOutputStream fos;
// String path ="data/data/com.focusmedica.eyeactivity/files/Images" + filename;
try {
fos =new FileOutputStream(path);
bitmap.compress(Bitmap.CompressFormat.JPEG, 100, fos);
fos.flush();
fos.close();
sentmail(path);
} catch (FileNotFoundException e) {
Log.e("GREC", e.getMessage(), e);
} catch (IOException e) {
Log.e("GREC", e.getMessage(), e);
}
}
我正在使用canvas 在videoview 上绘制一些东西。只有我得到黑屏。
我的videoview 在relative layout 里面。
提前致谢.....
【问题讨论】:
-
你用的是surfaceview还是textureview?
-
不,我没有同时使用这两个,实际上我是 android 新手,所以我不知道这些东西...@gvsharma
标签: android