I'm trying to pass a String array from one activity to another but when I try to read the array in the second activity, the values are null.
Here is how i'm passing the array from the first activity:
Bundle bundle = new Bundle();
bundle.putStringArray("Array", createArray(text));
Intent itemIntent = new Intent(this,Details.class);
itemIntent.putExtra("passedArray", bundle);
startActivity(itemIntent);
createArray(text) is a method that returns an array.
Here's how i'm trying to read the array in the second activity:
Bundle extras = this.getIntent().getExtras();
String[] array = extras.getStringArray("Array");
How do I initialise the array in the second activity with the corresponding array values that have been passed to it? If I try and read any of the values they have not been initialised and are null.