问题描述
我的应用程序将图像保存在某个目录中。如何以编程方式打开该目录(在文件浏览器应用程序中)?我扩展到this问题。我在网上尝试了很多代码片段,但没有任何效果。这是我保存图像的方式:
> python test_service.py start
Starting service test_service
Error starting service: The service did not respond to the start or control request in a timely fashion.
class SaveTask extends AsyncTask<Bitmap,Void,File> {
@Override
protected File doInBackground(Bitmap... bitmaps) {
String returnUri = null;
File outFile = null;
try {
outFile = new File(imagesDir,"Draw_Easy " + System.currentTimeMillis() + ".png");
FileOutputStream outputStream = new FileOutputStream(outFile);
bitmaps[0].compress(Bitmap.CompressFormat.PNG,100,outputStream);
outputStream.flush();
outputStream.close();
scanFile(outFile,"image/png");
} catch (Exception ignored) {
//Todo: Exception handling
}
return outFile;
}
}
返回/ storage / emulated / 0 / Draw Easy
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)