Camera Fix for API 30 (AB1)


Andrea

Hello everybody,

If compile the app (AB1) for Android with target SDK Api Level 30 camera plugin dont work (i tried both from the simulator and from the physical device)

Log:

Solved with this:


DecSoft

Hello Andrea,

First of all, thanks for share your solution. However, I try with the "CordovaCamera" sample app of AB2 and the sample (and the Camera plugin) works as expected for me also using the API 30 of Android. I update the current release of AB2, because I made some minor changes to the referred sample, but, in general, the plugin work as expected.

I suppose you are using AB1, but, I am not sure about what you want exactly or what of the AB1 camera related sample are you trying to use. If you refer to me what AB1 camera related sample are you trying to use or what you want maybe I can help you. My idea is that may you finally get the plugin working as expected, but, that the above code is not exactly the solution, to say like that, since I try here with the sample of AB2, and, basically we are using the same Cordova plugin.

P.S. May you can try with the "CordovaCamera" plugin of AB2 (please, download -do not update- the current release) to see if work as expected for you, since must do it, because it's working for me here.



Andrea

Hi David, the problem as mentioned above was with AB1, with the api level 29 no problem, with the 30 the camera did not open, I had tried both with my app and with the Sample Camera4 AB1.

I found the solution here: Can't open camera on Android 11 with targetSdkVersion=30


DecSoft

Hello Andrea,

There is no differences between AB1 and AB2 talking about Cordova plugins: we use the same Cordova plugins. I try with the sample included by AB2, and, right now, I also try with the "Camera4" sample of AB1, and, both of them work as expected. Note that the issue that you linked appear as "fixed", so, certainly there is a problem in the past, but, apparently has been fixed now.

Maybe you need to remove the "compiled" folder and compile the app from the scratch. Since the plugin work as expected here in both AB1 and AB2 (in both cases with the API 30 of Android), that must work also for you.



Andrea

sorry, better this way, it must have been a coincidence (maybe I will have deleted the compiled folder) that with that code no longer gave me an error.

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.