Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

设置存储路径无效 #73

Open
yangfeng1994 opened this issue Jun 17, 2023 · 0 comments
Open

设置存储路径无效 #73

yangfeng1994 opened this issue Jun 17, 2023 · 0 comments

Comments

@yangfeng1994
Copy link

看代码里面有一个地方是把路径设置死的,在Android 13之前好处理,但是在Android 13以后就无法处理了,只能通过把源码下载下来,重新,自行处理了,出现问题的代码RecordHelper 里面 如下:

/**
* 根据当前的时间生成相应的文件名
* 实例 record_20160101_13_15_12
*/
private String getTempFilePath() {
String fileDir = String.format(Locale.getDefault(), "%s/Record/", Environment.getExternalStorageDirectory().getAbsolutePath());
if (!FileUtils.createOrExistsDir(fileDir)) {
Logger.e(TAG, "文件夹创建失败:%s", fileDir);
}
String fileName = String.format(Locale.getDefault(), "record_tmp_%s", FileUtils.getNowString(new SimpleDateFormat("yyyyMMdd_HH_mm_ss", Locale.SIMPLIFIED_CHINESE)));
return String.format(Locale.getDefault(), "%s%s.pcm", fileDir, fileName);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant