c# - Scandit with device Motorola XT907 - Camera not focusing -
i'm testing application i'm making scan bar codes. application cross platform developing xamarin using visual studio. decided utilize scandit since seems best bar code scanning library xamarin.
the issue i'm having on specific device, photographic camera blurry , can't seem auto-focus. because of have hard time getting scan properly.
the built in photographic camera app on phone works great , focuses well. other bar code apps seem able focus fine also. tried app on android device, , works fine. seems combination of specific device , scandit.
the type of bar codes beingness scanned code128. disabled other types , seemed help quite bit, it's still hard scan.
here code:
public class mainactivity : activity, scandit.interfaces.iscanditsdklistener { private scanditsdkbarcodepicker picker; const string app_key = "it's secret."; protected override void oncreate(bundle bundle) { base.oncreate(bundle); setcontentview(resource.layout.main); button button = findviewbyid<button>(resource.id.mybutton); button.click += delegate { picker = new scanditsdkbarcodepicker(this, app_key); picker.overlayview.addlistener(this); picker.setcode39enabled(false); picker.setcode93enabled(false); picker.setean13andupc12enabled(false); picker.setean8enabled(false); picker.setupceenabled(false); picker.setitfenabled(false); picker.setmsiplesseyenabled(false); picker.setgs1databarenabled(false); picker.setgs1databarexpandedenabled(false); picker.setqrenabled(false); picker.setdatamatrixenabled(false); picker.setpdf417enabled(false); picker.setcodabarenabled(false); picker.startscanning(); setcontentview(picker); }; } public void didscanbarcode(string barcode, string symbology) { toast.maketext(this, string.format("barcode scanned: {0}, '{1}'", symbology, barcode), toastlength.long).show(); } public void didcancel() { toast.maketext(this, "cancel pressed.", toastlength.long).show(); } public void didmanualsearch(string text) { toast.maketext(this, "search used. " + text, toastlength.long).show(); } }
it turns out bug scandit library xamarin. emailed developers , informed me should fixed in next version, said released in mid november. downloaded latest scandit demo app, had been updated, , works fine now.
so should fixed when scandit 4.3 made public.
c# android camera barcode barcode-scanner
No comments:
Post a Comment