I have upgraded targetSdkVersion
and compileSdkVersion
to 33.
val picList =
result.data?.getParcelableArrayListExtra<PageNumberFile>(KEY_CAM_PIC_LIST)
It suggest me use Use the type-safer, What is the solution?
I have upgraded targetSdkVersion
and compileSdkVersion
to 33.
val picList =
result.data?.getParcelableArrayListExtra<PageNumberFile>(KEY_CAM_PIC_LIST)
It suggest me use Use the type-safer, What is the solution?
Your best guide would be DOC
This method was deprecated in
API Level 33
. Use the type-safergetParcelableArrayListExtra(java.lang.String, java.lang.Class)
starting from Android Build.VERSION_CODES#TIRAMISU.
so you should use THIS getParcelableArrayListExtra(String name, Class<? extends T> clazz)
. Note second argument, in your case it should be PageNumberFile::class.java
PS. I would post working snippet/line, but you have posted code as image and I can't copy it for improving and pasting in my answer and I won't be rewritting this, too lazy. Don't ever post text as not-copyable image!