I could be wrong but I think you could change part of Sub CreateDetector like this:
I think probably that way all formats for Android would be automatically supported, without having to add all the constants, even any new ones.
B4X:
#IF B4A
builder.RunMethod("setBarcodeFormats", Array(0)) ' ALL_FORMATS constant, value 0
#ELSE
builder.RunMethod("setBarcodeFormats", Array(format))
#End If