passing arrays using bundle in android

android, arrays, bundle

Solution

In activity A:

String[] abc;

Bundle bundle =new Bundle();
bundle.putStringArray("some string",abc);

In Activity B where you want to get give the code as:

String abcd[]=bundle.getStringArray("some string");

"some string" should be same in both case.

Problem

I need to pass an array of String/integer values from one Activity to another. How do I achieve this?

Original source

Related problems