I have got a HashMap
in Kotlin that I need to pass to another activity using intent, but its size exceeds the limit to using normal putExtra
so I need to write it down in a local file then read it again when I open the second intent.
here is my hashMap private var optionsList: HashMap<String, List<String>> = hashMapOf()
and am using HashMap.put
method to add data to it .
I've tried to send it using intent.putExtra(HashMap)
but it gives an error because it has hundreds of data.
Now all I need to know how to write it to a file and call it again from the second intent.