I have two activities.( activity 1 and activity 2) activity 1 has a public Array like this
public byte[][] arrtest=new byte[3][1024];
I call activity 2 and I want to get value from arrtest in activity 2.
How can I do this?
I have two activities.( activity 1 and activity 2) activity 1 has a public Array like this
public byte[][] arrtest=new byte[3][1024];
I call activity 2 and I want to get value from arrtest in activity 2.
How can I do this?
Pass array to another acivity and then use it.Check out this answer
You have to use bundle or adding it into intent.
Intent intent = new Intent(view.getContext(), ApplicationActivity.class);
intent.putExtra("key", value);
startActivity(intent);
invoked activity.
Intent intent = getIntent();
Bundle bundle = intent.getExtras();
if(bundle != null){
mealId = bundle.getInt("key");
}