Moshik
Moshik

Reputation: 589

Share an Arraylist between applications

i have two applications which i want them to share the same arraylist.

how could i achive something like that? is there anything in Android for sharing such a prefrenceses?

thanks,

Upvotes: 3

Views: 1297

Answers (2)

Jorgesys
Jorgesys

Reputation: 126465

When you pass between activities you can send info

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 receive the ArrayList

you can save data in Shared Preferences too and read in every Activity of your app

Shared Preferences

Upvotes: 1

Mathias Conradt
Mathias Conradt

Reputation: 28675

You can implement your own Contentprovider, see http://developer.android.com/reference/android/content/ContentProvider.html

Upvotes: 0

Related Questions