How to create a directory inside the Android application's data directory?

I am trying to create a directory on the data directory of my Android application. However, there’s no directory being created. I have followed the documentation on the Files plugin and modified the code a little bit for testing.

this.file.checkDir(this.file.externalDataDirectory, 'testDir') .then(_ => alert('Directory exists: '+_+". File path: "+this.file.externalDataDirectory)) .catch((err) => { alert("No directory. Created \"testDir\". File path: "+this.file.externalDataDirectory); this.file.createDir(this.file.externalDataDirectory, 'testing', false); });

What seems to be wrong? Thank you!

You may need additional permissions to write to externalDataDirectory.

Are you getting an error message?

I renewed my code and used this.file.externalDataDirectory and allowed the application to read and access my storage manually through the Application Info. One of these might have solved the problem but it’s weird that it didn’t asked for permission to access my storage on initial installation like other application used to do before doing something.

Hope someone could explain what is happening for it is confusing with the use of wireless debugging and having a hard time to find a way to debug console messages from the application.