Use this to “put” the file…
1 2 3 |
Intent i = new Intent(FirstScreen.this, SecondScreen.class); String strName = null; i.putExtra("STRING_I_NEED", strName); |
Then, to retrieve the value try something like:
1 2 3 4 5 6 7 8 9 10 11 |
String newString; if (savedInstanceState == null) { Bundle extras = getIntent().getExtras(); if(extras == null) { newString= null; } else { newString= extras.getString("STRING_I_NEED"); } } else { newString= (String) savedInstanceState.getSerializable("STRING_I_NEED"); } |