apache / cordova-plugin-camera

Apache Cordova Plugin camera
https://cordova.apache.org/
Apache License 2.0
960 stars 1.52k forks source link

no image selected after captured image #855

Open codingwithashu opened 7 months ago

codingwithashu commented 7 months ago

In Android 13 there was an error - 20 then I updated the PR of https://github.com/ochakov/cordova-plugin-camera.git now the camera is opening but once the captured image and clicked on the ok icon then "no image selected" error comes. Attached video

https://github.com/apache/cordova-plugin-camera/assets/111554315/e1026472-708a-4c57-8768-40af35b12cc2

breautek commented 7 months ago

Can you try the formal v7 release? It would have contained a rebased version of the Android 13 support PR which I believe had additional fixes applied.

You can install it by doing:

cordova plugin remove cordova-plugin-camera
cordova plugin add cordova-plugin-camera@7
codingwithashu commented 7 months ago

I followed your steps now , while building in production getting this error ERROR: \app\build\intermediates\bundle_manifest\release\AndroidManifest.xml:203: AAPT: error: resource xml/camera_provider_paths (aka com.xxxx.XXXX:xml/camera_provider_paths) not found.

breautek commented 7 months ago

platforms/android/app/src/main/xml/camera_provider_paths.xml should exist. If it doesn't can you try again but with --verbose ?

cordova plugin remove cordova-plugin-camera
cordova plugin add cordova-plugin-camera@7 --verbose
codingwithashu commented 7 months ago

attach file verbose.txt

breautek commented 7 months ago

Plugin doesn't support this project's cordova-android version. cordova-android: 10.1.2, failed version requirement: >=12.0.0

you'll need cordova-android@12 for API 33 support

codingwithashu commented 7 months ago

After the update to cordova-android@12 , same error "no image selected"

{ "name": "myAPPLite", "version": "0.0.1", "author": "Ionic Framework", "homepage": "https://ionicframework.com/", "scripts": { "ng": "ng", "start": "ng serve", "build": "ng build", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e" }, "private": true, "dependencies": { "@angular-material-components/moment-adapter": "^7.0.0", "@angular/animations": "^14.3.0", "@angular/cdk": "^13.3.9", "@angular/common": "^14.0.3", "@angular/core": "^14.0.3", "@angular/forms": "^14.0.3", "@angular/google-maps": "^14.0.4", "@angular/material": "^13.1.1", "@angular/platform-browser": "^14.0.3", "@angular/platform-browser-dynamic": "^14.0.3", "@angular/router": "^14.0.3", "@awesome-cordova-plugins/android-permissions": "^5.44.0", "@awesome-cordova-plugins/camera": "^6.4.0", "@awesome-cordova-plugins/camera-preview": "^5.44.0", "@awesome-cordova-plugins/core": "^5.43.0", "@awesome-cordova-plugins/deeplinks": "^6.3.0", "@awesome-cordova-plugins/file": "^5.44.0", "@awesome-cordova-plugins/file-opener": "^5.44.0", "@awesome-cordova-plugins/file-transfer": "^5.44.0", "@awesome-cordova-plugins/geolocation": "^5.43.0", "@awesome-cordova-plugins/launch-navigator": "^5.44.0", "@awesome-cordova-plugins/onesignal": "^5.44.0", "@capacitor/android": "^4.2.0", "@capacitor/app": "1.1.1", "@capacitor/core": "^3.5.1", "@capacitor/haptics": "1.1.4", "@capacitor/keyboard": "1.2.2", "@capacitor/status-bar": "1.0.8", "@ionic-native/app-availability": "^5.36.0", "@ionic-native/core": "^5.36.0", "@ionic-native/date-picker": "^4.20.0", "@ionic-native/network": "^5.36.0", "@ionic-native/zbar": "^5.36.0", "@ionic/angular": "^6.1.11", "@ionic/cordova-builders": "^6.1.0", "@ionic/core": "^6.1.11", "@ionic/storage-angular": "^3.0.6", "@mediapipe/tasks-vision": "^0.10.2", "@ngneat/tailwind": "^7.0.3", "async-function-delay": "^2.0.0", "bootstrap": "^5.2.0-beta1", "bootstrap-icons": "^1.8.3", "chart.js": "^3.9.1", "cordova-browser": "6.0.0", "cordova-plugin-androidx": "^3.0.0", "cordova-plugin-geolocation": "^4.1.0", "date-fns": "^2.28.0", "echarts": "^5.3.2", "hammerjs": "^2.0.8", "js-datepicker": "^5.18.0", "moment": "^2.24.0", "ng-circle-progress": "^1.6.0", "ng-lottie": "^0.3.2", "ng-multiselect-dropdown": "^1.0.0-beta.19", "ng2-pdfjs-viewer": "^13.2.2", "ng2-search-filter": "^0.5.1", "ngx-bootstrap": "^0.0.1", "ngx-echarts": "^8.0.1", "ngx-material-timepicker": "^5.5.5", "ngx-star-rating": "^2.1.0", "ngx-webcam": "^0.4.1", "node-sass": "^7.0.1", "rxjs": "~6.6.0", "tslib": "^2.2.0", "zone.js": "~0.11.4" }, "devDependencies": { "@angular-devkit/build-angular": "^14.0.3", "@angular-eslint/builder": "~13.0.1", "@angular-eslint/eslint-plugin": "~13.0.1", "@angular-eslint/eslint-plugin-template": "~13.0.1", "@angular-eslint/template-parser": "~13.0.1", "@angular/cli": "^14.0.3", "@angular/compiler": "^14.0.3", "@angular/compiler-cli": "^14.0.3", "@angular/language-service": "^14.0.3", "@angular/localize": "^14.0.3", "@capacitor/cli": "^3.5.1", "@ionic/angular-toolkit": "^6.0.0", "@tailwindcss/aspect-ratio": "latest", "@tailwindcss/forms": "latest", "@tailwindcss/line-clamp": "latest", "@tailwindcss/typography": "latest", "@types/echarts": "^4.9.15", "@types/jasmine": "~3.6.0", "@types/jasminewd2": "~2.0.3", "@types/node": "^12.11.1", "@types/offscreencanvas": "^2019.7.0", "@typescript-eslint/eslint-plugin": "5.3.0", "@typescript-eslint/parser": "5.3.0", "autoprefixer": "^10.4.1", "cordova-android": "^12.0.0", "cordova-background-geolocation-lt": "^4.8.1", "cordova-ourcodeworld-appinstalled": "github:ourcodeworld/cordova-ourcodeworld-appinstalled", "cordova-plugin-actionsheet": "^2.3.3", "cordova-plugin-android-permissions": "^1.1.3", "cordova-plugin-androidx-adapter": "^1.1.3", "cordova-plugin-appavailability": "^0.4.2", "cordova-plugin-background-fetch": "~7.1.1", "cordova-plugin-camera": "^7.0.0", "cordova-plugin-camera-preview": "^0.12.3", "cordova-plugin-cszbar": "^1.3.4", "cordova-plugin-device": "2.0.2", "cordova-plugin-dialogs": "^2.0.2", "cordova-plugin-file": "^7.0.0", "cordova-plugin-file-opener2": "^3.0.5", "cordova-plugin-file-transfer": "github:apache/cordova-plugin-file-transfer", "cordova-plugin-googlemaps": "github:mapsplugin/cordova-plugin-googlemaps#", "cordova-plugin-ionic-keyboard": "^2.0.5", "cordova-plugin-ionic-webview": "^5.0.0", "cordova-plugin-network-information": "^3.0.0", "cordova-plugin-splashscreen": "5.0.2", "cordova-plugin-statusbar": "^2.4.2", "eslint": "^7.6.0", "eslint-plugin-import": "2.22.1", "eslint-plugin-jsdoc": "30.7.6", "eslint-plugin-prefer-arrow": "1.2.2", "ionic-plugin-deeplinks": "^1.0.24", "jasmine-core": "~3.8.0", "jasmine-spec-reporter": "~5.0.0", "karma": "~6.3.2", "karma-chrome-launcher": "~3.1.0", "karma-coverage": "~2.0.3", "karma-coverage-istanbul-reporter": "~3.0.2", "karma-jasmine": "~4.0.0", "karma-jasmine-html-reporter": "^1.5.0", "ngx-tailwind": "^3.0.0", "onesignal-cordova-plugin": "^3.0.4", "postcss": "^8.4.5", "protractor": "~7.0.0", "tailwindcss": "^3.0.8", "ts-node": "~8.3.0", "typescript": "~4.7.4", "uk.co.workingedge.phonegap.plugin.launchnavigator": "^5.0.6" }, "description": "An Ionic project", "cordova": { "plugins": { "cordova-plugin-statusbar": {}, "cordova-plugin-device": {}, "cordova-plugin-splashscreen": {}, "cordova-plugin-ionic-webview": {}, "cordova-plugin-ionic-keyboard": {}, "cordova-plugin-androidx-adapter": {}, "onesignal-cordova-plugin": {}, "cordova-plugin-camera-preview": {}, "cordova-plugin-android-permissions": {}, "cordova-plugin-googlemaps": {}, "cordova-plugin-file": { "ANDROIDX_WEBKIT_VERSION": "1.4.0" }, "cordova-plugin-file-opener2": { "ANDROID_SUPPORT_V4_VERSION": "27.+" }, "cordova-plugin-cszbar": {}, "cordova-plugin-file-transfer": {}, "uk.co.workingedge.phonegap.plugin.launchnavigator": { "GOOGLE_API_KEY_FOR_ANDROID": "", "OKHTTP_VERSION": "3.12.0" }, "cordova-plugin-background-fetch": {}, "cordova-background-geolocation-lt": { "GOOGLE_API_VERSION": "19.+", "APPCOMPAT_VERSION": "28.+", "OKHTTP_VERSION": "3.12.+", "EVENTBUS_VERSION": "3.3.1" }, "cordova-plugin-network-information": {}, "com.ourcodeworld.appinstalled": {}, "cordova-plugin-appavailability": {}, "ionic-plugin-deeplinks": { "URL_SCHEME": "soslite", "DEEPLINK_SCHEME": "https", "DEEPLINK_HOST": "soslite.page.link", "ANDROID_PATH_PREFIX": "/", "ANDROID_2_PATH_PREFIX": "/", "ANDROID_3_PATH_PREFIX": "/", "ANDROID_4_PATH_PREFIX": "/", "ANDROID_5_PATH_PREFIX": "/", "DEEPLINK_2_SCHEME": " ", "DEEPLINK_2_HOST": " ", "DEEPLINK_3_SCHEME": " ", "DEEPLINK_3_HOST": " ", "DEEPLINK_4_SCHEME": " ", "DEEPLINK_4_HOST": " ", "DEEPLINK_5_SCHEME": " ", "DEEPLINK_5_HOST": " " }, "cordova-plugin-camera": { "ANDROIDX_CORE_VERSION": "1.6.+" } }, "platforms": [ "browser", "android" ] } }

image

breautek commented 7 months ago

Can you reproduce in a minimal sample app? It should contain vanilla Cordova project (e.g. no frameworks) with just the minimum plugins to reproduce the issue (e.g. the camera plugin). The goal here is to isolate the issue and remove all other variables from play.

If the issue can be reproduced in the sample app, please share it and someone can take a deeper look.

If the issue cannot be reproduced, then it suggests the issue is something external of the plugin, or something else might be interfering with the plugin in some way.

ivanprojetosti commented 7 months ago

Hello, this situation had solution ? I'm with the same problem.

ivanprojetosti commented 6 months ago

My problem was resolved with a fork on git hub

ionic cordova platform remove android

ionic cordova plugin remove cordova-plugin-camera

ionic cordova plugin add https://github.com/jalios/cordova-plugin-camera.git

ionic cordova platform add android@12.0.0