-
-
Notifications
You must be signed in to change notification settings - Fork 72
Imagepicker not working, selection is empty #189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm having the same exact issue here |
I just found out that on android this happens for the photos saved on SD card, when I copy the photos to Downloads folder and try again, it works fine. on iOS though I haven't had any luck as no matter where the photo is located, it never works. |
+1 |
Any help would be much appreciated |
After upgrading to 5.0. selectedImage is not having getImage method. |
The issue is not about the |
I just want to confirm the issues because it does seem like there are two different ones:
For the iOS issue - please try the following approach to get the image path - #181 (comment) For the Android issue - can you confirm that selecting files from internal memory works and only selecting files from external locations produces an |
Hi Lini, we were using same example, getImage method is not undefined. I am looking at the documentation migrations to 6. it says method will return imageAsset instead of custom object. We are getting imageAsset instead of custom image. |
Thank you for the additional information. I contacted the people, who wrote the new 6.x version and they confirmed that the |
@lini thank you for your reply.
Yes that's correct.
I've tried that and it doesn't work. The solution above relies on the
I can definitely confirm that that's the case. Even testing the demo app gives me the same issue. |
Hi @snq,
This is the |
@lini okay I just tested it on a real iOS device and I can successfully select the image and the preview would appear on the list view. But I'm confused then, if that is my selection object (as you mentioned and also how I get it) how would I access the ImageAsset? to be able to store it or show it in any other way?
Initially simulator only and now both.
11.2
No.
Yes. |
Hi Lini, we also have requirement to upload image but it was working properly. After upgrade we are not even able to view and upload for both ios and android. We are using following code.
Any help is highly appreciated. |
@lini Now I'm able to get the
My only problem now is the bug in Android: not able to select photos located on the external SD card. |
@sivamamidi-REISys the issue you're facing is about If you upgraded to 6.0 forget about this method. What you need to do now is:
|
Getting an error like ReferenceError: Can't find variable: QBImagePickerControllerDelegate in ios. |
@sivamamidi-REISys remove and add the ios platform: That fixed that issue for me. |
This is still a bug for Android. Selecting images from external SD returns null. Any updates? |
Hi, I am also moving from version 3.x to the newest one and I am having issues capturing the image, then working with it using BitmapFactory. Below my code:
` I am getting the following error: Pretty much stating the object I should send to BitmapFactory is null (as you can see, I am using here the string with the file path because this.upload(a) did not work. Question is, how can I get image object with the new implementation, as I used to get with the old one: |
With v.6.0.3 the image picking intent on android will only display local images (excluding external storages like Photos, Drive, etc.) so they won't get the above mentioned error. If you need support for external files in your app, you are more than welcome to send us a PR to review. For the empty selection on iOS, please refer to this thread. |
@miguelopezv find my solution here ... |
Which platform(s) does your issue occur on?
Please, provide the following version numbers that your issue occurs with:
"dependencies": {
"@angular/animations": "~5.2.0",
"@angular/common": "~5.2.0",
"@angular/compiler": "~5.2.0",
"@angular/core": "~5.2.0",
"@angular/forms": "~5.2.0",
"@angular/http": "~5.2.0",
"@angular/platform-browser": "~5.2.0",
"@angular/platform-browser-dynamic": "~5.2.0",
"@angular/router": "~5.2.0",
"nativescript-angular": "~5.2.0",
"nativescript-camera": "^4.0.2",
"nativescript-drop-down": "^3.2.1",
"nativescript-imagepicker": "^6.0.1",
"nativescript-iqkeyboardmanager": "^1.2.0",
"nativescript-ngx-fonticon": "^4.1.0",
"nativescript-plugin-firebase": "^5.2.0",
"nativescript-social-login": "^4.0.0",
"nativescript-sqlite": "^2.0.1",
"nativescript-telerik-ui": "^3.1.4",
"nativescript-theme-core": "~1.0.4",
"nativescript-ui-listview": "^3.5.4",
"nativescript-ui-sidedrawer": "^3.5.2",
"reflect-metadata": "~0.1.10",
"rxjs": "~5.5.5",
"tns-core-modules": "^4.0.0",
"zone.js": "~0.8.18"
},
"devDependencies": {
"@angular/compiler-cli": "~5.2.0",
"@ngtools/webpack": "~1.9.1",
"babel-traverse": "6.4.5",
"babel-types": "6.4.5",
"babylon": "6.4.5",
"clean-webpack-plugin": "~0.1.19",
"codelyzer": "~4.0.2",
"copy-webpack-plugin": "~4.3.0",
"css-loader": "~0.28.7",
"extract-text-webpack-plugin": "~3.0.2",
"lazy": "1.0.11",
"nativescript-dev-sass": "^1.3.5",
"nativescript-dev-typescript": "~0.6.0",
"nativescript-dev-webpack": "^0.11.0",
"nativescript-worker-loader": "~0.8.1",
"raw-loader": "~0.5.1",
"resolve-url-loader": "~2.2.1",
"sass-loader": "~6.0.6",
"tns-platform-declarations": "^4.0.0",
"tslint": "~5.8.0",
"typescript": "~2.6.2",
"uglifyjs-webpack-plugin": "~1.1.6",
"webpack": "~3.10.0",
"webpack-bundle-analyzer": "^2.9.1",
"webpack-sources": "~1.1.0"
}
Please, tell us how to recreate the issue in as much detail as possible.
When trying to select an image, this code that I've been using for a while stopped working, returning
undefined is not an object (evaluating 'file.split')
. Also, according to the demo provided selection[0] returnsIs there any code involved?
The text was updated successfully, but these errors were encountered: