I'm trying to pass some data from one activity to another in my android app, however some errors occur when I try to run the code. I'm passing data this way:
Intent pod= new Intent(ACTION_NAME);
Bundle extras = new Bundle();
extras.putString("nume", NUME_VAL);
extras.putString("prenume", PRENUME_VAL);
startActivity(pod);
And recive this:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Bundle data = getIntent().getExtras();
String nume = data.getStringExtra("nume");
String prenume = data.getStringExtra("prenume");
}