android:maxSdkVersion="28" WRITE_EXTERNAL_STORAGE"

In JUCE 7.0.0 / Projucer 7.0.0 when, in Android Exporter. I

enable Write to External Storage

Then this is written to । AndroidManifest.xml:

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="28"/>

Why is android:maxSdkVersion="28" added ?

If I remove it, saving works fine in Android API 30 (Emulator) !?!?


Eigil

1 Like

That might explain it:

This is following the advice given in the Android documentation, here.

WRITE_EXTERNAL_STORAGE has no effect on API level 29+, so there’s no reason to request it when targeting that API level.

1 Like

That is not what I experienced. I had to remove the

android:maxSdkVersion=“28”

to be able to save files ?

+1, same experience here

Are you using a native file chooser to pick the file/location to save?

Yes

Yes I’m using the native fileChooser:

myChooser =
		std::make_unique <FileChooser>
		(
			"Save Audio File as..."
			,
			fileToSave
			,
			"*.wav"
		);