i can not figure out how to pass the results from onActivityResult to resultBreakdown. I know there is a get/set and I've looked at a few tutorials, but I'm just not getting it. Or, Is there a better way? The program runs fine up if i comment out \*/ the resultBreakdown Class

Side note, I just started with java/android. I'm a better learner at doing then reading. I know my code is a little clumsy. Thanks for the help

Note: i edited code to reflect suggested changes

```
package com.example.spdwiz18.testproject;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.view.View.OnClickListener;

import com.google.android.gms.common.api.CommonStatusCodes;
import com.google.android.gms.vision.barcode.Barcode;

import java.text.DateFormat;
import java.time.*;
import java.time.temporal.*;
import java.time.LocalDate;
import java.util.Calendar;
import java.util.Date;

public class GrindLogActivity extends AppCompatActivity {
TextView barcodeResult;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.gringlogactivity);

    // this is how to set id's from the xml file with vNames. (julianDate)
    TextView bcc = (Textview)findViewById(R.id.bccheck);
    TextView pc = (Textview)findViewById(R.id.pcode);
    TextView pd = (Textview)findViewById(R.id.pdate);
    // TextView en = (Textview)findViewById(R.id.estnum);
    TextView sn = (Textview)findViewById(R.id.seqnum);
    TextView nw = (Textview)findViewById(R.id.nweight);
    barcodeResult = (TextView) findViewById(R.id.barcode_result);
    TextView julianDate = (TextView) findViewById(R.id.datecode);
    TextView td1 = (TextView) findViewById(R.id.todaydate1);

    // this is how you get a julian/original date for android
        LocalDate now = LocalDate.now();
        int julian = now.get(ChronoField.DAY_OF_YEAR);
    // this how to set you current date for android
        Date date = new Date();
        String stringDate = DateFormat.getDateInstance().format(date);
    // this is how to set your vNames to your method variables
        julianDate.setText(Integer.toString(julian));
        td1.setText(stringDate);

}

/*add click event to the scan barcode button */
public void scanBarcode(View v) {
    Intent intent = new Intent(this, ScanBarcodeActivity.class);
    startActivityForResult(intent, 0);

}

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    if (requestCode == 0) {
        if (requestCode == CommonStatusCodes.SUCCESS) {
            if (data != null) {
                Barcode barcode = data.getParcelableExtra("barcode");
                barcodeResult.setText("Barcode value : " + barcode.displayValue);
            } else {
                barcodeResult.setText("No Barcode Found");
            }
            super.onActivityResult(requestCode, resultCode, data);
        }
    }
}
public void resultsBreakdown(String result) {
if (result.length() == 44) {
    pc.setText(result.CharSequence(2,10));
    pd.setText(result.CharSequence(13,18));
    sn.setText(result.CharSequence(21,27));
    nw.setText(result.CharSequence(13,18));
} else {
    bcc.setText("invalid barcode");
}

```

}