Skip to content
Advertisement

How to check if barcode software is installed and run it (or install it) on iPhone iPad iPod?

I am writing a web application that will use barcode scanning software.


The process for Android devices is following:
I have the element on page: <a href="intent://scan/?ret=www.mysite.com%2F%7BCODE%7D%2F#Intent;scheme=zxing;package=com.google.zxing.client.android;end">

After click, it is checked if user’s device has Barcode Scanner installed. If not installed, user is redirected to Google Play and software is downloaded and installed. If installed, the Barcode Scanner is opened, user scans the barcode and the results are sent back (callback) to www.mysamplesite.com/{CODE}/ where {CODE} is a barcode content sent via $_GET. Pretty cool!

The process for iPod/iPad/iPhone devices is following:

This would be my question :). How to do the exact same thing on iOS devices? Is there any software that has similar capabilities please?

Advertisement

Answer

If anyone is interested, I have found a solution (jQuery is not necessary but I use it in my app anyway):

<iframe id="ios" width="1" height="1" style="visibility:hidden"></iframe>

$('body').on('click', '.scan_button', function() {
    var scan_link = 'p2spro://scan?formats=EAN13,EAN8,UPCE,ITF,CODE39,CODE128,CODE93,STD2OF5,CODABAR,QR&callback=www.mysamplesite.com%2FCODE%2F';
    $('#ios').attr("src", scan_link);

    setTimeout(function() {               
        window.location = "https://itunes.apple.com/us/app/pic2shop-pro-diy-barcode-scanner/id382585125?mt=8";
    }, 1000);    
});

The functionality is similar to ‘Barcode Scanner’ on Android, but unfortunately, ‘pic2shop PRO’ for iOS is not free. Anyway it works.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement