use of com.google.zxing.client.result.TextParsedResult in project zxing by zxing.
the class CaptureActivity method handleResult.
private void handleResult(Result result) {
ParsedResult parsed = ResultParser.parseResult(result);
Intent intent;
if (parsed.getType() == ParsedResultType.URI) {
intent = new Intent(Intent.ACTION_VIEW, Uri.parse(((URIParsedResult) parsed).getURI()));
} else {
intent = new Intent(Intent.ACTION_WEB_SEARCH);
intent.putExtra("query", ((TextParsedResult) parsed).getText());
}
startActivity(intent);
}
Aggregations