Open leocrawf opened 7 months ago
I got the same problem.Finally, i solved this problem with following way, just downgrade version to v1.0.10, then it work properly.
Downgrading the package did not help as the permissions would no longer work on Android13+. PS: The problem affects only the recent versions of Android, works on 7 or 10.
to solve the issue i had to get help from the native script discord. i recommend that you join.
@leocrawf could you share here what was the solution that you got in the discord ?
@leocrawf What was the solution? I am seeing this problem too.
Using imagepicker 3.1.1, and following the advice from the discord discussion, i managed to get it working by adding this line to my app.gradle dependencies:
implementation("androidx.documentfile:documentfile:1.0.1")
Like this (some lines omitted for brevity):
android { dependencies { constraints { ... } implementation("androidx.documentfile:documentfile:1.0.1") } ... }
@IvanTonchev brilliant, thanks for your help 👍🏻
I am having an issue now where @nativescript/imagepicker works perfectly when I do ns run android, wherein I am able to see the images in their respective folders and make a selection and the selected image is shown in my ui as the selected image. However, after I do a ns build releease .... the apk or aab file does not show the selected image. I am able to see the images list in their respective folders, make a selection but then it does not appear in my ui as selected, as If I had selected nothing. My package.json is as shown before:
"dependencies": { "@nativescript-community/drawingpad": "^4.1.0", "@nativescript-community/https": "^4.1.8", "@nativescript-community/perms": "^2.3.0", "@nativescript/appavailability": "^2.0.0", "@nativescript/background-http": "^6.0.0", "@nativescript/core": "~8.6.0", "@nativescript/directions": "^2.0.2", "@nativescript/email": "^2.1.0", "@nativescript/imagepicker": "^3.0.1", "@nativescript/social-share": "^2.3.0", "@nativescript/theme": "~3.0.2", "@nstudio/nativescript-carousel": "^8.0.3", "@nstudio/nativescript-checkbox": "^2.0.5", "@nstudio/nativescript-loading-indicator": "^4.3.4", "@triniwiz/nativescript-image-cache-it": "^7.4.0", "@triniwiz/nativescript-toasty": "^4.1.3", "moment": "^2.30.1", "nativescript-audio": "^6.2.6", "nativescript-feedback": "^2.0.0", ... }, "devDependencies": { "@nativescript/android": "8.6.2", "@nativescript/webpack": "~5.0.18" }
and the relevant settings in my AndroidManifest are:
The relevant part of my app.gradle is: android { compileSdkVersion 33 buildToolsVersion "33" defaultConfig { minSdkVersion 23 targetSdkVersion 33 versionCode 10074 }
I am using open jdk 14.