Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Easiest way to check for ZXing support?

Tags:

android

zxing

I want an app to use ZXing barcode scanner. I think the ScanningViaIntent is a good way for this app to integrate the scanning. However, I would like to runtime know if the user is able to use this app or not. Is there a simple way to do this? Or should I now and then check their AndroidManifest.xml to see what the required features for a device are + check if the user has Play Store installed?

EDIT: Just to make it clear; I wanted to in code know if there was device support. I know the ScanningViaIntent handles the app not being installed very well. :)

like image 245
Roy Solberg Avatar asked Nov 28 '25 04:11

Roy Solberg


1 Answers

The ZXing team have provided a small library of code to handle this scenario elegantly, including prompting the user to download the ZXing barcode scanner if they do not already have it installed.

The details and download link can be found here:

I realise such linking is frowned upon here, but other than wholly duplicating the information from the linked site and posting the full content of the provided library, I couldn't see how else to adequately answer the question. Any advice on how to would be appreciated

EDIT: Apologies, I should have checked the links in the OPs question and seen that he was already aware of the IntentIntegrator code libary for ZXing

like image 57
paulkayuk Avatar answered Nov 30 '25 17:11

paulkayuk



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!