I\'m trying to add ZXing to my project (add a button which calls the scanner upon press). I found this: http://groups.google.com/group/android-developers/browse_thread/threa
Go here for links.
In the activity that you want to trigger a barcode scan include
IntentIntegrator.initiateScan(YourActivity.this);
and then also include:
public void onActivityResult(int requestCode, int resultCode, Intent intent) {
if (requestCode == 0) {
if (resultCode == RESULT_OK) {
String contents = intent.getStringExtra("SCAN_RESULT");
String format = intent.getStringExtra("SCAN_RESULT_FORMAT");
// Handle successful scan
TextView
} else if (resultCode == RESULT_CANCELED) {
// Handle cancel
}
}
};
The Barcode Scanner app will handle the actual scanning. If the Barcode Scanner app is not installed, the integrator will prompt them to install it.
----------- From nEx.Software ---------------