TMSFNCWXCAMERA ON ANDROID

I plan to develop Barcode Decoder via Camera on Android.
Starting with the TMSFNCWXCAMERA the software starts on Android but remains only at the icon of Delphi without showing anything else.
I give permissions to use camera but nothing changes.
Something stucks it from the beggining,
Any ideas ?
Any demo ?

Thanks
Minas

Hi,

We cannot reproduce this. The following starts the camera on Android:

procedure TForm3.Button1Click(Sender: TObject);
begin
  TMSFNCWXCamera1.Start;
end;

What is your Android and IDE version?

Hi,
Delphi 11, Android 11,
new multi-device application, android 64-bit, only TMSFNCWXCamera1
application can not start, remains at Delphi icon

Do you get no other errors?
Did you add JavaScriptHelper.jar and FNCWebChromeClient.jar as per our guide: TMS Software | Android support for FMX applications ?

After adding JavaScriptHelper.jar and FNCWebChromeClient.jar
i get

Webpage not available

The webpage at file:///storage/emulated/0/Android/data/com.embarcadero.Project1/files/tmp/%7B763B9B34-5AD4-4AC2-8143-FF6DE60B388E%7D.html could not be loaded because:

net::ERR_ACCESS_DENIED

We have been able to reproduce the issue. A fix will be coming up soon, but in the meantime you can set the FileLocation public property as a workaround. This will force the camera to load from an online URL instead of a local file.

procedure TForm1.FormCreate(Sender: TObject);
begin
  TMSFNCWXCamera1.FileLocation := cflOnline;
end;

Can you please check

TMSFNCWXCamera1.CameraType:=wctBack;

i can not activate the back camera on an Android phone
only the front camera is working even after the command

TMSFNCWXCamera1.CameraType:=wctBack;

Thank you for your report. We have been able to reproduce the issue.
We have fixed the problem, and the fix will be included in the next release.

An incremental source update has been sent to your private messages.

Barcode decoder via camera
TMSFNCWXBarcodeDecoder1Decoded
fires automatically as soon as a barcode is preview in camera
or should i do something to read the barcode ?

Hi,

The event might not trigger immediately, but as soon as it gets a clear view on the barcode and it's able to read it (for example, no camera shaking because the barcode lines will blur). The OnDecoded event will automatically trigger in that case.

Hi,
any other tips for reading a barcode ?
I did not manage to read any until now !

Can you please reproduce the Decoder at Android with camera reading ?

You can check the Demo folder and see the BarcodeDecoder demo for FMX. Just don't forget to add the necessary libraries for Android first and you might also want to change the CameraType.

Hi
when i run the barcode decoder demo on Android
i get the message
Jave type
JContent_ContextCompat could not be found

This is due to an incompatibility between projects created in earlier Delphi versions and Delphi 11.

Right-click the Libraries folder in your project, and click Revert System Files to Default. (For both 32-bit and 64-bit android targets). Then try to Save, Clean and finally Build.

The BarcodeDecoder Demo has the same behaviour like mine software
It can not fires TMSFNCWXBarcodeDecoder1Decoded
with any barcode
i tested a lot of barcode128 but nothing

We cannot reproduce such behavior.

If you have Chrome installed on your PC, can you navigate to chrome://inspect/#devices while your device is connected to your PC and the application is running? You should see your device appear in the list and you'll be able to open the developer tools for the embedded browser. Then check the browser console to see if any error messages appear.

You can also check the quaggaJS library that is used for barcode decoding in the component. It might give you a feel on how it's working: QuaggaJS, an advanced barcode-reader written in JavaScript

BarCode Decoder Demo
VCL : OK
FMX Windows : OK
FMX Android : not even one barcode decode

I suppose problem at the camera or problem at the tool !

Were you able to debug the embedded browser of your running Android application? It might indeed be an issue related to the Android version and it would help to see if there are any error messages.

if you have some time check BarCode Scanner Cognex Corporation
unbelievable fast and accurate