title: sending data across files
body: <p>I'm creating an app right now and I'm a little confused. I have 2 files, MainActivity and QrCodeGernerator. Im am doing this for a data collection app. The user inputs data into the MainActivity and the shares it with the QrCodeGenerator which then creates a qr code. The issue is the qr code keeps being null. Any help would be appreciated. MainACtivity is first(I've included snipets related to the question not my whole code)</p>
  
  <pre><code> public static String finalOutput;
  
   public void output (View view) {
          EditText editSN = findViewById(R.id.editSN);
          EditText editTN = findViewById(R.id.editTN);
          RadioGroup alliance = findViewById(R.id.alliance);
          RadioButton allianceI = findViewById(alliance.getCheckedRadioButtonId());
          RadioGroup driverStation = findViewById(R.id.driverStation);
          RadioButton driverStationI = findViewById(driverStation.getCheckedRadioButtonId());
          EditText matchNumber = findViewById(R.id.editMatchNumber);
          RadioGroup driverOff = findViewById(R.id.crossLine);
          RadioButton driveOffI = findViewById(driverOff.getCheckedRadioButtonId());
          EditText autoPowerPortBottom = findViewById(R.id.editAutoPowerPortBottom);
          EditText autoPowerPortOuter = findViewById(R.id.editAutoPowerPortOuter);
          EditText autoPowerPortInner = findViewById(R.id.editAutoPowerPortInner);
          EditText autoDroppedPowerCells = findViewById(R.id.editAutoDroppedPowerCells);
          RadioGroup autoConflict = findViewById(R.id.autoConflict);
          RadioButton autoConflictS = findViewById(autoConflict.getCheckedRadioButtonId());
          EditText PowerPortBottom = findViewById(R.id.editPowerPortBottom);
          EditText PowerPortOuter = findViewById(R.id.editPowerPortOuter);
          EditText PowerPortInner = findViewById(R.id.editPowerPortInner);
          EditText droppedPowerCells = findViewById(R.id.editDroppedPowerCells);
          CheckBox boxTrench = findViewById(R.id.boxTrench);
          CheckBox boxCenter = findViewById(R.id.boxCenter);
          CheckBox boxOnTheirSide = findViewById(R.id.boxOnTheirSide);
          RadioGroup climb = findViewById(R.id.climb);
          RadioButton climbS = findViewById(climb.getCheckedRadioButtonId());
          RadioGroup multiClimb = findViewById(R.id.multiClimb);
          RadioButton multiClimbS = findViewById(multiClimb.getCheckedRadioButtonId());
          RadioGroup driverSkill = findViewById(R.id.driverSkill);
          RadioButton driverSkillI = findViewById(driverSkill.getCheckedRadioButtonId());
          RadioGroup focusOnDefense = findViewById(R.id.groupFocusOnDefense);
          RadioButton focusOnDefenseI = findViewById(focusOnDefense.getCheckedRadioButtonId());
          EditText beached = findViewById(R.id.editBeached);
          EditText disabled = findViewById(R.id.editDisabled);
          EditText died = findViewById(R.id.editDied);
          EditText fouls = findViewById(R.id.editFouls);
          EditText techFouls = findViewById(R.id.editTechFoul);
          EditText notes = findViewById(R.id.editNotes);
  
          Button submit = findViewById(R.id.submit);
  
  
          String[] output = new String[]{
                  editSN.getText().toString(),
                  editTN.getText().toString(),
                  allianceI.getText().toString(),
                  driverStationI.getText().toString(),
                  matchNumber.getText().toString(),
                  driveOffI.toString(),
                  autoPowerPortBottom.getText().toString(),
                  autoPowerPortOuter.getText().toString(),
                  autoPowerPortInner.getText().toString(),
                  autoDroppedPowerCells.getText().toString(),
                  autoConflictS.getText().toString(),
                  PowerPortBottom.getText().toString(),
                  PowerPortOuter.getText().toString(),
                  PowerPortInner.getText().toString(),
                  droppedPowerCells.getText().toString(),
                  climbS.getText().toString(),
                  multiClimbS.toString(),
                  disabled.getText().toString(),
                  died.getText().toString(),
                  fouls.getText().toString(),
                  techFouls.getText().toString(),
                  notes.getText().toString()
          };
  
          for (int i = 0; i &lt; output.length; i++) {
              finalOutput = finalOutput.concat(output[i].toString());
          }
      }
  </code></pre>
  
  <p>and then qr code</p>
  
  <pre><code>private String test;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.qr_code);
  
      barcode=findViewById(R.id.barCode);
      textView=findViewById(R.id.dataText);
      test=MainActivity.finalOutput;
  
  
      String data_in_code=test;
      MultiFormatWriter multiFormatWriter=new MultiFormatWriter();
      try{
          BitMatrix bitMatrix=multiFormatWriter.encode(data_in_code, BarcodeFormat.QR_CODE,200,200);
          BarcodeEncoder barcodeEncoder=new BarcodeEncoder();
          Bitmap bitmap=barcodeEncoder.createBitmap(bitMatrix);
          barcode.setImageBitmap(bitmap);
  </code></pre>