Skip to content

Android mode " no such file or directory" #103

Closed
@Henry-derbug

Description

@Henry-derbug

Running the SimplePlayback example (processing4.2) on an android 13 (and others) phone throws the error:

java.io.FileNotFoundException: /data/user/0/processing.test.simpleplayback/files/null.wav: open failed: ENOENT (No such file or directory)

command that causes the error:
soundfile = new SoundFile(this, "null.wav");

the "null.wav" file is located in the data directory of the app.

i also checked absolute path on internal or external storage but the SoundFile Class doesnt accept sparators in the path.

The path that the SoundFile(this, "null.wav"); throws is different from the correct android path.

path from error SoundFile(this, "null.wav");
/data/user/0/processing.test.simpleplayback/files
#######
path from
SDcards = context.getExternalFilesDirs(null);
sdPath0 = SDcards[0].toString() ;
sdPath1 = SDcards[1].toString() ;
sdPath0: /storage/emulated/0/Android/data/processing.test.simpleplayback/files

what can I do to get the SoundFile playing the .wav file from internal memory or external SDCard on an android?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions