Is there any workaround how to transfer larger amount of JSON
files into another Activity?
I'm getting android.os.TransactionTooLargeException: data parcel size 640176 bytes
Activity
is taking payload of certain array of JSONObjects
which has to be used in that Activity
. But payload size is dynamic. Sometimes its 20 objects, sometimes 2, but currently in this case its 364 objects inside JSONArray
and I cant pass it to Activity
.
fun openStationViewer(stations: List<CityStation>){
val int = Intent(this, CityStationMapActivity::class.java)
val bundle = Bundle()
val stationsJs = CityStationLoader.convertStationsToPayload(stations)
bundle.putString(CityStationMapActivity.CITY_STATIONS, stationsJs.toString())
int.putExtras(bundle)
startActivityForResult(int, REQUEST_CITY_STATION_MAP)
}