Skip to main content

ISBN barcode search using eclipse/android



I know it is possible to scan a movie and see if the movie is available at the store. How would I do this using zxing? I did look over the links pertaining this and I am having a difficulty time understanding it all. I did download the .apk file and convert it to .zip, but I do not see any classes in the folders. I am really confused and I wish there was a web site that explains how to use zxing to make this possible.





anyone have any web sites they know of that will get me started?





thanks.


Comments

  1. The easiest way to use zxing is to call it by Intent.

    Intent intent = new Intent("com.google.zxing.client.android.SCAN");
    intent.setPackage("com.google.zxing.client.android");
    startActivityForResult(intent, REQUEST_CODE_SCANNER);


    This will launch the scanner activity, if Barcode Scanner is installed. After a barcode is recognized it will return to your activity and call

    public void onActivityResult(int requestCode, int resultCode, Intent intent) {
    Log.i(TAG, "ACTIVITY RESULT");
    if (requestCode == REQUEST_CODE_SCANNER) {
    if (resultCode == RESULT_OK) {
    // get the scanner/input results
    String result = intent.getStringExtra(SCAN_RESULT);
    String format = intent.getStringExtra(SCAN_RESULT_FORMAT);
    } else if (resultCode == RESULT_CANCELED) {
    // nothing to do
    }
    }
    }


    With these values you can then query any database to get information about the scanned product.

    You might furthermore check, if the Barcode Scanner is installed. I'm doing this is my own app. If the scanner isn't installed, I give the user the possibility to launch the Android Market with the Barcode Scanner App preselected, so he just needs to hit "Download".

    ReplyDelete

Post a Comment

Popular posts from this blog

Slow Android emulator

I have a 2.67 GHz Celeron processor, 1.21 GB of RAM on a x86 Windows XP Professional machine. My understanding is that the Android emulator should start fairly quickly on such a machine, but for me it does not. I have followed all instructions in setting up the IDE, SDKs, JDKs and such and have had some success in staring the emulator quickly but is very particulary. How can I, if possible, fix this problem?