i want to pass integer value from one activity to other i try to do this but value not pass please tell me right solution.
this the activity code from where i want to pass value to other activity.
Intent intent = new Intent(getApplicationContext(),
TotalCalories.class);
intent.putExtra("Total Sum", sum);
startActivity(intent);
this is the code where i want to get the value.
Bundle extras = getIntent().getExtras();
int sum = Integer.parseInt(extras.getString("Total Sum"));
TextView textview = (TextView) findViewById(R.id.textViewname);
textview.setText(extras.getString("Total Sum"));