[Barcode Plugin] Barcode and Camera - Android Manifest error

Forge Component
(27)
Published on 21 May by OutSystems R&D
27 votes
Published on 21 May by OutSystems R&D

Hi Colleagues,

as you know there are plugins that when we put them together, without doing any workaround, they can give an error in Android Manifest, because they are using the same feature of the mobile device

I intend to use the Barcode Plugin and the Camera Plugin, and as such it's giving me the error "duplicate elements declared in androidmanifest" when I generate the APK.

Does anyone have any idea of a workaround for this?

Do you know if there is a version on github that has this problem solved without I having to do a fork and edit the plugin.xml file?

Cheers,

Miguel

Hi Miguel,


This case may occur .

If you are using two plugins and they try to add same element in android Manifest .

In this case you can get error.

I will be able to give exact solution when you provide me more detail eg: which element is getting dublicate . 

or error log .


More details i need like:

Which  camera forge compoonent you are using .

If you provide these details, then only i will be able to check plugin.xml file from github . 

If required i will help you to create your own component .


Regards,

Vivek Patel


Solution

Hello Vivek, I managed to solve the problem. Thank you very much for your availability, I'm grateful.

In fact it's necessary to fork the github of the OutSystems component. If you have this need and this problem in the future, you can go to the Extensibility Configurations of the Barcode Plugin, and change the URL that is there for this one: "https://github.com/miguelverdasca/csZBar-1.git#v1_1.0"

This has only one problem, it's if the OutSystems team makes updates to the plugin you won't receive them, but when that happens, it's a matter of making a new fork, and changing the code of the first image to that of the second image.



Cheers,

Miguel

Solution

Hello Miguel,

Are you sure that both the Barcode Plugin and Camera Plugin that you are using are the OutSystems supported ones? They should be able to co-exist properly, as this is a scenario that we test internally.

Otherwise, is it also possible that you are using a third plugin that can be conflicting with one of the supported ones?

Best regards,
Nuno Azevedo

Hi Nuno,

I am 100% sure that they are supported by OutSystems, not least because I always prefer these, as well as I am sure that I am using the latest version of the forge. This type of error is not the first time that it happens to me, and with these two plugins in concrete, it has also happened with other colleagues.


Regarding using other plugins, yes, in fact I have other plugins in the application, I would say that they should be practically all supported by the OS, not to say all. Use in the application super normal plugins, apart from these two, the others are plugins related to security, and one to open the links within the App.


But Nuno, I do not rule out the possibility that there may be an error on my side, however this workaround that I implemented solved the problem.


Cheers,

Miguel

Hi Nuno,

I am 100% sure that they are supported by OutSystems, not least because I always prefer these, as well as I am sure that I am using the latest version of the forge. This type of error is not the first time that it happens to me, and with these two plugins in concrete, it has also happened with other colleagues.


Regarding using other plugins, yes, in fact I have other plugins in the application, I would say that they should be practically all supported by the OS, not to say all. Use in the application super normal plugins, apart from these two, the others are plugins related to security, and one to open the links within the App.


But Nuno, I do not rule out the possibility that there may be an error on my side, however this workaround that I implemented solved the problem.


Cheers,

Miguel

New version: "url": "https://github.com/miguelverdasca/csZBar-1#v1.3.3-OS11_1.1",