• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps How to pass mutableList through intent?

wseng92

Android Enthusiast
I have a mutableList which declared as below.

Java:
var newList: MutableList<String> = mutableListOf()

How to pass newList through intent?

I tried this but not working.

Java:
mIntent.putParcelableArrayListExtra("mFilePath", ArrayList(newList))

Error

Code:
 Type inference failed. Expected type mismatch:  required:
java.util.ArrayList<out Parcelable!>! found:
kotlin.collections.ArrayList<String!> /* =
java.util.ArrayList<String!> */
 
Back
Top Bottom