Camera IOS and show image


Mario Steinbacher

Hello David!

Do you have any experience with the new WKWebview and the camera cordova plugin not showing caputured images?
because since I use your new WKWebview I do get an Error when I want to display the taken, or from photolibrary, image with the camera.
Not allowed to load resource: file://path_to_the_file

Is there any config.xml prefernce setting I have to set or something else?

The problem is only on IOS

best regards

mario


DecSoft

Hello Mario,

Yes; there is a couple of options. The first one can be to retrieve the photo using the destination type "DATA_URL", that is:

If we want to use destination type "FILE_URI", in other words, if what we get is a path starting by "file://", then we must use certain "magic method" exposed by Cordova iOS for this cases: window.WkWebView.convertFilePath, which as is referred here at the end of the article.

I am not sure... probably I add this "magic method" to the Cordova File plugin, to we can use it from certain method of this plugin in AB.



DecSoft

Hello Mario,

Finally I decide to add the referred "magic method" into the Cordova File plugin. Additionally I also add the method into the Cordova camera plugin, so we get it available in both plugins, which is good in case that we need only one of them.

You can update your AB copy to this new release.



Mario Steinbacher

Thank you very much David!

You are awesome!


DecSoft

Hello to all,

Thank you very much David!

You are awesome!

Thank you, Mario! ;-)


Todo el mundo puede leer el foro de soporte de DecSoft para aprender del mismo, sin embargo, sólo los clientes de DecSoft pueden abrir nuevos hilos. Compre una o más licencias de productos de DecSoft y obtendrá este y otros beneficios.

Este sitio utiliza "cookies" útiles para almacenar sus preferencias.

Bien. Ocultar esta nota. Obtener más información.