I have upgraded targetSdkVersion and compileSdkVersion to 33.
I am now getting warnings telling me that the getSerializableExtra(name:) and getParcelableExtra(name:) methods are deprecated.
I checked and confirmed from the documentation in the Intent class that these two methods are indeed deprecated.
The documentation suggests that I use the new getSerializableExtra(name:clazz:) and getParcelableExtra(name:clazz:) methods instead.
Can anyone can help me use the new methods?
Example warnings
- Warning while getting an
Object:
- Warning while getting a
ListorArrayList:


This is what I use:
I've also written the same for getParcelable here and requested this to be added to the Support libraries directly