Возможно, кто-то уже сталкивался с этой проблемой и нашел решение
У меня есть приложение, созданное с помощью cordova-android - 9 и targetSdkVersion - 29
При попытке получить картинку с камеры после обработки фото кадрированием возникает ошибка: «В доступе отказано, невозможно сохранить обрезанное изображение»
Я экспериментировал с разрешениями WRITE_EXTERNAL_STORAGE, READ_EXTERNAL_STORAGE, MANAGE_EXTERNAL_STORAGE в app \ src \ main \ AndroidManifest.xml Я также добавил android: requestLegacyExternalStorage = "true"
В app \ build.gradle добавлены compileSdkVersion 29 и targetSdkVersion 29
Я прочитал тонну документации на developer.android, пробовал решения из github и stackoverflow, но, к сожалению, ничего не сработало.
Если кто знает решение проблемы, помогите пожалуйста. Буду признателен за любую идею или подсказку решения
Мой AndroidManifest.xml:
...
<application android:hardwareAccelerated = "true" android:icon = "@mipmap/ic_launcher" android:label = "@string/app_name" android:supportsRtl = "true">
...
<uses-permission android:name = "android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name = "android.permission.USE_FINGERPRINT" />
<uses-permission android:name = "android.permission.READ_CONTACTS" />
<uses-permission android:name = "android.permission.WRITE_CONTACTS" />
<uses-permission android:name = "android.permission.GET_ACCOUNTS" />
<uses-permission android:name = "android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name = "android.permission.WAKE_LOCK" />
<uses-permission android:name = "android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name = "android.permission.ACCESS_FINE_LOCATION" />
<uses-feature android:glEsVersion = "0x00020000" android:required = "true" />
<uses-feature android:name = "android.hardware.location" />
<uses-feature android:name = "android.hardware.location.gps" />
<uses-permission android:name = "android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name = "android.permission.CAMERA" android:required = "false" />
<uses-feature android:name = "android.hardware.camera" android:required = "false" />
<uses-feature android:name = "android.hardware.camera.front" android:required = "false" />
<uses-permission android:name = "com.android.launcher.permission.INSTALL_SHORTCUT" />
<uses-permission android:name = "com.android.launcher.permission.UNINSTALL_SHORTCUT" />
<uses-permission android:name = "android.permission.VIBRATE" />
...
build.gradle:
...
android {
defaultConfig {
versionCode cdvVersionCode ?: new BigInteger("" + privateHelpers.extractIntFromManifest("versionCode"))
applicationId privateHelpers.extractStringFromManifest("package")
if (cdvMinSdkVersion != null) {
minSdkVersion cdvMinSdkVersion
}
if (cdvMaxSdkVersion != null) {
maxSdkVersion cdvMaxSdkVersion
}
if (cdvTargetSdkVersion != null) {
targetSdkVersion cdvTargetSdkVersion
}
}
...
config.xml:
...
<plugin name = "es6-promise-plugin" spec = "^4.2.2" />
<plugin name = "cordova-plugin-add-swift-support" spec = "^2.0.2" />
<plugin name = "cordova-plugin-android-permissions" spec = "^1.0.0" />
<plugin name = "cordova-plugin-device-motion" spec = "^2.0.1" />
<plugin name = "cordova-plugin-file" spec = "^6.0.1" />
<plugin name = "cordova-plugin-file-transfer" spec = "^1.7.1" />
<plugin name = "cordova-plugin-network-information" spec = "^2.0.1" />
<plugin name = "cordova-plugin-splashscreen" spec = "^5.0.2" />
<plugin name = "cordova-plugin-touch-id" spec = "^3.4.0">
<variable name = "FACEID_USAGE_DESCRIPTION" value = "For quick authentication." />
</plugin>
<plugin name = "cordova-plugin-contacts" spec = "^3.0.1">
<variable name = "CONTACTS_USAGE_DESCRIPTION" value = "Your contact list data will be sent to the server and used to check if your contacts are using this application." />
</plugin>
<plugin name = "cordova-plugin-whitelist" spec = "^1.3.3" />
<plugin name = "cordova-plugin-appavailability" spec = "^0.4.2" />
<plugin name = "cordova-plugin-ios-keychain" spec = "~3.0.1" />
<plugin name = "cordova-plugin-camera" spec = "^4.0.3">
<variable name = "CAMERA_USAGE_DESCRIPTION" value = "The camera is used to scan QR codes." />
<variable name = "PHOTOLIBRARY_USAGE_DESCRIPTION" value = "This app requires photo library access to function properly." />
</plugin>
<plugin name = "cordova-plugin-listpicker" spec = "^2.2.2" />
<plugin name = "cordova-plugin-ionic-webview" spec = "^4.1.0" />
<plugin name = "cordova-plugin-android-fingerprint-auth" spec = "~1.5.0" />
<plugin name = "cordova-plugin-ionic-keyboard" spec = "^2.1.3" />
<plugin name = "cordova-plugin-statusbar" spec = "~2.4.3-dev" />
<plugin name = "cordova-android-support-gradle-release" spec = "^3.0.0">
<variable name = "ANDROID_SUPPORT_VERSION" value = "27.+" />
</plugin>
<plugin name = "cordova-plugin-decimal-keyboard-wkwebview" spec = "~1.0.3" />
<plugin name = "cordova-plugin-qrscanner" spec = "^3.0.1" />
<plugin name = "cordova-plugin-card-io" spec = "~2.1.1" />
<plugin name = "cordova-plugin-secure-key-store" spec = "~1.5.4" />
<plugin name = "cordova-plugin-vibration" spec = "~3.1.1" />
<plugin name = "cordova-plugin-shortcuts-android" spec = "~0.1.0" />
<plugin name = "cordova-plugin-cutout" spec = "~1.0.10" />
...
У меня тоже проблема с Ionic 5