I want to send a list of object form a class that I have created through intent from one application, and get this list in one other.
I tried this :
Intent i = new Intent();
i=getActivity().getPackageManager().getLaunchIntentForPackage(getString(R.string.package_app));
ArrayList<MyClass> list = new ArrayList<MyClass>();
i.setAction(Intent.ACTION_SEND);
i.putExtra(Intent.EXTRA_TEXT, list);
i.setType("text/plain");
And to get it i have done this :
Intent receivedIntent = getIntent();
ArrayList<MyClass> getList = new ArrayList<MyClass>();
getList=(ArrayList<MyClass>)receivedIntent.getSerializableExtra(Intent.EXTRA_TEXT);
startActivity(i);
But i have an exception when i want to get the list