Barcode scanning issue in IE8 - asp.net-mvc

We are facing an issue with the IE version 8 related to the barcode scanner.
The issue is, in the first scan of barcode in IE8, the scanner doesn’t return the CR suffix. We need to hit enter button manually and then when we scan the same barcode again and it is working fine. We are facing this issue only on the first scan in IE 8. In all other browser, the scanner is working fine.
We have written the code in .Net MVC framework to read the barcode scanner values.
Here is the code:
-------------------Knockout code----------------------------
self.PackageValidator = function (data, event) {
$("#success").hide();
$("#error").hide();
}
-------------------------HTML Code-----------------------
input id="packageIdentifier" data-bind="value: TransferClass.ProductIdentifier, event: { change: PackageValidator }" type="text"
Please let us know if anyone has any solution for this issue.
Regards,
Vipin Singhal

Related

textarea broken words on ipad and iphone - bluetooth scanner barcode zebra

I've this problem: I've connected a bluetooth reader scanner to my iPad as emulator keyboard, when I try to read a barcode with focus on a textarea, it seems to break the words randomly.
This only on iPad and iPhone, on all browsers: Firefox, Chrome, Safari
but not on Android. But I've to work on Ipad.
Output Reading on pc (value of textarea):
FF0034DC3214E20336C30C37
FF0034DC3214E20236C30C37
FF0034DC321540C336C30C03
FF0034DC3214A53036C30C06
FF0034DC3215804936C30C32
FF0034DC321584F936C30C35
FF0034DC3215A45336C30C03
FF0034DC321540C536C30C35
FF0034DC321B2CB336C30C03
FF0034DC3214A4D936C30C34
FF0034DC321540C436C30C36
FF0034DC3215907136C30C35
Output reading on iPad:
FF0034D
C3214E20
336C30C37
FF0034DC3214E20236C30C37
FF00
34DC32
1540C336C30C03
FF0034DC
3214A53036C30C06
FF00
34DC3215804936C30C32
FF0034DC321584F936C30C35
FF0034DC
3215A45336C30C03
FF0034DC321540C536C30C35FF0034DC321B2CB336C30C03FF0034DC3214A4D936C30C34FF0034DC321540C436C30C36FF0034DC3215907136C30C35
The strange things is that on some website it works!
For example on "https://jsfiddle.net/", if I put cursor in tab "html" and begin the readings with scanner, it works fine (on the html of this tab there is a textarea and when you write something, a span is created.
I don't understand how it works).
Anyone had never have this problems before?

ZXing barcode scanner in Xamarin Forms on iOS doesn't read barcodes

I'm working on a Xamarin Forms PCL project targeting Android and iOS that needs some basic barcode scanning functionality.
I got things up and running with the forms version of the ZXing.Net.Mobile package following this tutorial and referencing this guide and it works great on Android. However, on iOS the camera comes up but the OnScanResult event is never fired.
I've tested it on several iOS devices running several different versions (anywhere from 8.0 - 10.3) and fiddled with everything I can think of, referencing their sample projects as well. ZXing.Net.Mobile and ZXing.Net.Mobile.Forms nuget packages were installed in all projects.
Here's my scanner code, triggered from a button press on my main page:
var scanPage = new ZXingScannerPage();
scanPage.OnScanResult += (result) =>
{
scanPage.IsScanning = false;
Device.BeginInvokeOnMainThread(async () =>
{
await Navigation.PopAsync();
await DisplayAlert("Scanned Barcode", result.Text, "OK");
});
};
await Navigation.PushAsync(scanPage);
and AppDelegate.cs:
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{
global::Xamarin.Forms.Forms.Init();
global::ZXing.Net.Mobile.Forms.iOS.Platform.Init();
LoadApplication(new App());
return base.FinishedLaunching(app, options);
}
After two days of fighting with this, I feel like I'm at my wit's end. Has anyone else encountered similar problems? Thanks for any guidance!
Edit 1
Here's the device log output (Message column only) when clicking the button to trigger the above code. No log items are added while the camera is open and pointed at various barcodes. I don't see anything suspicious here, but maybe someone else does?
PERF: Alloc AVCaptureVideoPreviewLayer took 14.14 ms.
AppleH4CamIn::power_on_hardware
AppleH4CamIn::ISP_SelectBestMIPIFrequencyIndex_gated - channel: 0, index: 0
StartScanning
AppleH4CamIn::setPowerStateGated: 1
ZXingScannerView.Setup() took 0.167 ms.
ASL Sender Statistics
AppleH4CamIn::ISP_FlushInactiveDARTMappings: 0x00000000
AppleH4CamIn::ISP_SelectBestMIPIFrequencyIndex_gated - channel: 0, index: 0
Edit 2
I ran the sample Xamarin Forms PCL from the github repo and am having the same problems on iOS with the camera opening fine, but no barcode ever read. Therefore I'm thinking the problem must be with my Visual Studio and/or Xamarin setup. I'm running Visual Studio 2015 Community on the stable Xamarin channel.
add this on ios
protected override void OnAppearing()
{
base.OnAppearing();
qrcode.IsScanning = true;
}`enter code here`
protected override void OnDisappearing()
{
qrcode.IsScanning = false;
base.OnDisappearing();
}
Try using this:
scanPage.IsAnalyzing = true;
IsAnalyzing is different from IsScanning.
I faced the same the issue like you. But after using IsAnalyzing = true; It is fixed.
I finally got it working with this project as a starting point. It's just a basic barcode scanning implementation using ZXing, but for whatever reason I could finally read barcodes on iOS.
It's probably a version-related problem, but I couldn't narrow it down.
Edit
I posted this same question in the Xamarin Forums: https://forums.xamarin.com/discussion/comment/272209#Comment_272209
It seems the answer was downgrading to ZXing version 2.1.47. I haven't done any work with the library for a few months so I haven't tested new versions.

Print styles overriding screen styles after AirPrint in iOS webview

I am working on a hybrid HTML5/iOS app that uses the Safari Webview. We are using AirPrint to allow the user print the contents of the webview. The problem I am having is that after the print dialog is opened, the print styles are taking affect on the screen, and even after printing is complete or canceled do not go away. This does not happen in our Windows or Android versions of the app, which use CEF and Android System Webview respectively. Print styles in those versions of the application are only applied to the print out, as expected.
Anyone have any experience using AirPrint with Safari Webview that could shed some light on a solution? I have considered just adding/removing the link tag containing the CSS with javascript before and after printing, but that feels hacky, and doesn't answer the curious question of why print styles are being applied to the screen.
Any help appreciated! Sorry there is no real way to attach code to this!
Yes, this is indeed a not expected behaviour. However, we can try to solve this using JavaScript.
Theory: When the print is done, let's reload the stylesheets. The browser will paint the page again and hopefully using screen definitions.
Practice: As we don't have a JavaScript callback after printing, you could try reload your stylesheets using the window.onfocus event, as follows:
function updateStylesheets(){
var links = document.getElementsByTagName("link");
for (var x in links) {
var link = links[x];
if (link.getAttribute("type").indexOf("css") > -1) {
link.href = link.href + "?id=" + new Date().getMilliseconds();
}
}
}
window.onfocus = updateStylesheets;
In detail, it grabs all <link> tags and appends a random number after, forcing a reload on the stylesheets.
Please let me know if that worked, I'd be glad to help.

Chrome iOS webkit speech-recognition

I'm trying to implement speech recognition on Chrome on the iPad without any luck. Just to cut to the chase and remove any dependencies on my implementation of the webkitSpeechRecognition api, Glenn Shire's excellent sample code does not run on Chrome v27 on an iPad 1 running iOS 5.1.1 or Chrome v31 on an iPad3 running iOS 7.0.4, at least as far as I can tell. It fails at this line:
if (!('webkitSpeechRecognition' in window)) {
r.onState('upgrade');
return;
}
I can't figure out a workaround, and I've not seen any online postings that say anything about speech recognition not working in the iOS version of Chrome. Anyone else run into this?
Chrome on iOS doesn't support Speech Recognition at the moment.
Google have to use iOS UIWebView that mean there is no special web interpretation feature that are not supported on Safari.
You may have a look to this link.
In case you want to recognize few simple commands you can look on Pocketsphinx.js
The code to recognize speech is simple:
var id = 0;
recognizer.postMessage({command: 'initialize', callbackId: id});
var keyphrase = "HELLO WORLD";
recognizer.postMessage({command: 'addKeyword', data: keyphrase, callbackId: id});
recognizer.postMessage({command: 'start', data: id});
recognizer.postMessage({command: 'process', data: array});
recognizer.postMessage({command: 'stop'});
recognizer.onmessage = function(e) {
if (e.data.hasOwnProperty('hyp')) {
alert(e.data.hyp);
}
};
For more details see also the full example here

Flex AS3 Iphone - How to Open Native Maps Application?

I have a bunch of buttons that opens the default map application and puts something in the users system clipboard. It works fine on Android tablets, but the Iphone does nothing when the button is clicked. Here is the code:
case "MapYummyYummy":
System.setClipboard( "1665 Stelton Rd Piscataway Nj 08901" )
_callURL = "geo: 40.4978922, -74.4488224";
var targetURL:URLRequest = new URLRequest(_callURL);
navigateToURL(targetURL);
break;
Does anyone know the equivalent for this that will work on Iphone devices? thanks!
Have you tried this setData method? (I have no experience with this one, but looks like a viable alternative).
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/desktop/Clipboard.html#setData()
iOS launch maps via URL reference:
http://developer.apple.com/library/ios/#featuredarticles/iPhoneURLScheme_Reference/Articles/MapLinks.html
Querying for a location:
http://maps.apple.com/?q=cupertino
setting a start and end for directions:
http://maps.apple.com/?daddr=San+Francisco,+CA&saddr=cupertino
Hope it works for ya (looked up not tested).

Resources