code: public static BarcodeIntentResult parseActivityResult(int requestCode, int resultCode, Intent intent) {
  		if (requestCode == REQUEST_CODE && resultCode == Activity.RESULT_OK) {
  			String contents = intent.getStringExtra(SCAN_RESULT);
  			String formatName = intent.getStringExtra(SCAN_RESULT_FORMAT);
  			return new BarcodeIntentResult(contents, formatName);
  		}
  		return null;
  	}
docs: <p>
  Call this from your {@link Activity}'s {@link Activity#onActivityResult(int, int, Intent)} method.
  </p>
  
  @param requestCode
  @param resultCode
  @param intent
  @return null if the event handled here was not related to this class, or else an {@link BarcodeIntentResult}
  containing the result of the scan. If the user cancelled scanning, the fields will be null.