fttx / barcode-to-pc-app

Barcode to PC app
https://barcodetopc.com/
GNU General Public License v3.0
176 stars 63 forks source link

4.5 Image Component LineageOS #304

Closed gitschwarz closed 11 months ago

gitschwarz commented 1 year ago

I run the android app on Lineage OS 20.0 The new image component doesn't work. On the server side I have a simple template

image (with path) enter

I choose the template in the app and nothing happens. The app go back to the template selection ... no camera, no error message .... Any help?

fttx commented 1 year ago

Hello,

perhaps the smartphone is still running the old version. The IMAGE component was introduced in v4.5.0, can you check it in the app info page as well?

gitschwarz commented 1 year ago

yes it's 4.5.0 on the smartphone (and no scan session was created)

fttx commented 1 year ago

Ok, I'm not sure why this is happening, perhaps the app is not loading the correct output template, can you try to add something like a STATIC TEXT component just to make sure it is loading a new template?

Also, could you also check if the app has some disabled permission in the app info settings?

Thank you

gitschwarz commented 1 year ago

Ok - I checked again with a new template, a barcode scan and text components and the image component That all work until the image-component should starting - then the template breaks and no scan session were created. The app permissions are ok (barcode scan work well ...). Is there any camera-lib, that isn't included in lineageos ?

gitschwarz commented 1 year ago

Tomorrow I test this feature with Iphone and other android phone ...

fttx commented 1 year ago

You're right it may be the cause of the issue.

From the plugin source code I see that it launches the native/stock camera: https://github.com/apache/cordova-plugin-camera/blob/84166f63554903564c9791541ce6f168930a9a61/src/android/CameraLauncher.java#L312

perhaps lineageos includes a camera with a different package name and it is not able to launch it

gitschwarz commented 1 year ago

I think the problem is the packetmanager: "PackageManager mPm = this.cordova.getActivity().getPackageManager();"

Thank you for your time and support.

gitschwarz commented 1 year ago

I browsed many site about cordova https://github.com/apache/cordova-plugin-camera/issues?q=camera and the camera-plugin. It seems that camera plugin doesn't work every time and it is not stable everytime ... One Solution :-) : "I change the plugin. Now I use https://github.com/apache/cordova-plugin-media-capture."

fttx commented 1 year ago

Thanks for the information, can you make a pull request with the changes? I'll be glad to change it also in the official version

ionic docs: https://ionicframework.com/docs/v3/native/media-capture/

gitschwarz commented 1 year ago

Sorry no - not fast ...perhaps in 2 months or so ... I'm familiar with linux and bash and so ...

fttx commented 1 year ago

Sorry, but where you able to run it using the other plugin? If yes how did you convert the output to base64?

Another user reported a similar issue on a Motorola G5 Plus, is it the same smartphone as yours?

Thank you

gitschwarz commented 11 months ago

Thank you for the new versions. Image Component is now working with lineageos (90%). Only the "ok" -Button (for sending the picture to the server ) is not visible .... But this is not a big problem.

fttx commented 11 months ago

What is the send button you're referring to? Can you please send a screenshot?

Thanks