I have a QR code scan result, i would like to get a specific string from the result.
example: if the result is "ROGS,Hudson,J'kobi,Anderson,Harrison,454242,SAM,HARRY, TIM, JOHN,SAMMY,TONNY,SAMON,GROOD,TOD."
And i would like to get the name TONNY from the result string. What is the best way to go about this in Android Java code.
My Current code is as below
public void handleResult(Result rawResult) {
// Do something with the result here
Log.e("handler", rawResult.getText()); // Prints scan results
Log.e("handler", rawResult.getBarcodeFormat().toString()); // Prints the scan format
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle("Scan Result");
builder.setMessage(rawResult.getText());
AlertDialog alert1 = builder.create();
alert1.show();
// If you would like to resume scanning, call this method below:
mScannerView.resumeCameraPreview(this);
}