I am trying to create a recycler view with data from another activity. I need to transfer data from one activity to the recycler view activity without it opening the recycler view activity. Because only when I press another button do I want to go to the next activity.
I have tried using intent, however startActivity(intent)
always opens the other activity. I also tried using Share preferences to save the data and retrieve it in the other activity. However, Base64.DEFAULT
was not working for me.
public void sendData(Bitmap images, String image_class) {
Intent send = new Intent(getApplicationContext(), Scanned_List_Activity.class);
send.putExtra("image_class",image_class);
send.putExtra("image", images);
startActivity(send);
}