How to access the Map from another Activity . Cookies are needed for requests from another Activity when using Jsoup.connect .
Tried to use Intent.putExtra , but objects of type Map cannot be transferred, serialization does not work. What am I doing wrong?
Please provide a brief visual example of the code from 2 Activities.
Connection.Response res = Jsoup.connect("").data("", "").method(Connection.Method.POST).execute(); Map<String, String> Cookies = res.cookies();
Mapis an interface, not a class, it cannot be serialized. You need to use some kind of interface implementation, for example,HashMap- it is serialized and transmitted via the intent. In general, you cannot get your cookies into this interface either. - pavlofff