什么是storage/emulated/0?如何在google files中找到该文件?Android

xienkqul  于 2024-01-04  发布在  Android
关注(0)|答案(1)|浏览(836)

什么是Storage/Emulated/O?
这是我保存音频文件的函数:

private void synthesizeTextToAudioFile(String textToSpeak) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
       
        String destDirectory = Environment.getExternalStorageDirectory().getAbsolutePath();
        File directory = new File(destDirectory);
        if (!directory.exists()) {
            directory.mkdirs(); =
        }

        // Create a unique file name
        String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss", Locale.getDefault()).format(new Date());
        String audioFileName = "audio_" + timeStamp + ".mp3";
        File outputFile = new File(directory, audioFileName);

        // Synthesize text to an audio file
        speech.synthesizeToFile(textToSpeak, null, outputFile, "uniqueID");

        // Display a message with the file location
        Toast.makeText(getContext(), "Audio File Saved at: " + outputFile.getAbsolutePath(), Toast.LENGTH_LONG).show();
    } else {
        Log.e(TAG, "Synthesizing to file is not supported on this device");
       
    }
}

字符串
我试图在谷歌文件中找到该文件,但我无法.它说该文件是保存在storage/emulsified/0,但在哪里?有没有一种方法,我可以直接在sdCard中创建一个文件夹,然后能够在谷歌文件上打开它?

ubof19bj

ubof19bj1#

storage/emulated/0是您可以访问的智能手机内存的个人部分的根。要查看那里的所有文件和文件夹,您需要一个功能强大的文件管理器,例如强烈推荐的File Manager plus,它的工作原理类似于Windows' File ExplorerGoogle Files不能满足这些要求。使用File Manager plus,您可以浏览文件夹,查找和播放您的mp3文件,创建/重命名/复制/移动/删除文件/文件夹,以及更多。

相关问题