Telerik-Verified-Plugins / ImagePicker

Cordova Plugin For Multiple Image Selection
MIT License
181 stars 331 forks source link

Cordova Image picker problem #224

Open PrashantPrajapati13 opened 4 years ago

PrashantPrajapati13 commented 4 years ago

cordova-plugin-image-picker is not working in android studio latest API version 29. window.imagePicker.getPictures is crashing with error "The image file could not be opened". How can I resolved it?

saviour2008 commented 4 years ago

I also blocked by this error, hope this issue will be fixed quickly. @PrashantPrajapati13

saviour2008 commented 4 years ago

cordova-plugin-image-picker is not working in android studio latest API version 29. window.imagePicker.getPictures is crashing with error "The image file could not be opened". How can I resolved it?

@PrashantPrajapati13 Do you install the latest version or 2.3.3?

PrashantPrajapati13 commented 4 years ago

Please follow these steps @saviour2008

=> first add plugin cordova-plugin-telerik-imagepicker

=> and after than you add this line config.xml file

=>after adding this you will be required to remove platform and cordova prepare by this code...

cordova platform rm cordova-plugin-telerik-imagepicker --nosave cordova prepare

Now your image picker is working fine

saviour2008 commented 4 years ago

Please follow these steps @saviour2008

=> first add plugin cordova-plugin-telerik-imagepicker

=> and after than you add this line config.xml file

=>after adding this you will be required to remove platform and cordova prepare by this code...

cordova platform rm cordova-plugin-telerik-imagepicker --nosave cordova prepare

Now your image picker is working fine

@PrashantPrajapati13 the second step "this line config.xml", Do you mean I add <application android:requestLegacyExternalStorage="true" /> in edit-config tag?

but when I should ionic run build:android? after cordova platform rm cordova-plugin-telerik-imagepicker --nosave cordova prepare?

LucasBourgeois commented 3 years ago
<edit-config file="AndroidManifest.xml" mode="merge" target="/manifest/application">
    <application android:requestLegacyExternalStorage="true" />
</edit-config>

It may not works for android 11 caused by scoped storage tho ?

In addition, it's causing MultiImageChooserActivity not being explicitly declared (at least for my case)

martinbertinat commented 3 years ago

Hi @LucasBourgeois did you find a solution? I'm having a lot of problems with Android 11!

Thanks