warning: [deprecation] readParcelable(ClassLoader) in Parcel has been deprecated

Reference:

https://developer.android.com/reference/android/os/Parcel#readParcelable(java.lang.ClassLoader)

This method is deprecated from API level 33, so you can safely manage this situation with:

Parcel in;
LatLng latLng;
if (Build.VERSION.SDK_INT >= 33)  // new version
    latLng = in.readParcelable(LatLng.class.getClassLoader(), LatLng.class);
else  // old version
    latLng = in.readParcelable(LatLng.class.getClassLoader());

Leave a Reply

Your email address will not be published. Required fields are marked *