I have an integer value in one activity, when I debug I can see there is a value be placed in. The value comes from a counter inside another function within the same class. I am trying to send the variable to another activity and display it in a TextView.
Sending Class:
Intent intent = new Intent(TrackingActivity.this, StatActivity.class);
intent.putExtra("yzValue" , getyzVal());
startActivity(intent);
Receiving Class:
Intent intent = getIntent();
baValue = (TextView) findViewById(R.id.baValue);
String baVal = intent.getStringExtra("yzValue") ;
maxX.setText(String.valueOf(baVal));
I have tried various solution but it just displays NULL in the TextView.