cordova-plugin-file-transferでAndroid 10、11のアップロード

config.xmlには次のものを設定する必要がある。

requestLegacyExternalStorageを設定する場合、APIレベルを29に設定する必要があるため、この2つを組み合わせる。

<edit-config file="AndroidManifest.xml" target="/manifest/application" mode="merge">
    <application android:requestLegacyExternalStorage="true"/>
</edit-config>
<preference name="android-targetSdkVersion" value="29" />

また、コンパイルを通す場合は「http://schemas.android.com/apk/res/android」を設定する。

<widget id=”xxx.xxx.xxx” version=”1.0.0″ xmlns=”http://www.w3.org/ns/widgets” xmlns:cdv=”http://cordova.apache.org/ns/1.0″ xmlns:android=”http://schemas.android.com/apk/res/android”>

アップロードについては、権限を有効する方法も参考にする。

参考ページ