开发者

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开发者_如何学Python there anything in Android for sharing such a prefrenceses?

thanks,


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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜