Sharing Arraylist Between Applications

I have two applications that I want them to share the same arraylist.

How could I achieve something like this? Is there anything on Android to share such preferences?

thank,

+3
source share
2 answers

When switching between actions, you can send information

Bundle bundle = new Bundle();
bundle.putStringArrayList("ArrayPics",myArrayofPics);         
Intent myIntent= new Intent(ActivityA.this, ActivityB.class);
myIntent.putExtras(bundle);
startActivity(myIntent);    

so your activity B can get an ArrayList

You can also save data in general settings and read in each event of your application.

General settings

+1
source
0
source

Source: https://habr.com/ru/post/1750077/


All Articles