Skip to content
This repository has been archived by the owner on Jun 22, 2022. It is now read-only.

Caused by android.os.BadParcelableException Parcelable protocol requires subclassing from Parcelable on class o.bsc com.akexorcist.localizationactivity.core.LocalizationActivityDelegate.checkBeforeLocaleChanging #92

Open
kyh8496 opened this issue Mar 4, 2021 · 6 comments

Comments

@kyh8496
Copy link

kyh8496 commented Mar 4, 2021

I'm using 1.2.6 version

com.akexorcist.localizationactivity.core.LocalizationActivityDelegate.checkBeforeLocaleChanging (LocalizationActivityDelegate.java:140)

error line code : activity.intent.getBooleanExtra(KEY_ACTIVITY_LOCALE_CHANGED, false)

This is an issue I discovered through Firebase Crashlytics.
The issue occurs intermittently

@akexorcist
Copy link
Owner

@kyh8496 In v1.2.7, there's pull request from #83. That might solve this issue. Please check it out.

@akexorcist
Copy link
Owner

I close this issue because there's no response for a month. If you still have a problem, please feel free to re-open it.

@kyh8496
Copy link
Author

kyh8496 commented Apr 22, 2021

The issue still occurs in version 1.2.9.
BadParcelableException when try getBooleanExtra

i think that it needs to try catch BadParcelableException the line

private fun checkBeforeLocaleChanging() {
val isLocalizationChanged =
activity.intent?.getBooleanExtra(KEY_ACTIVITY_LOCALE_CHANGED, false) ?: false
if (isLocalizationChanged) {
this.isLocalizationChanged = true
activity.intent?.removeExtra(KEY_ACTIVITY_LOCALE_CHANGED)
}
}

@akexorcist akexorcist reopened this May 10, 2021
@kyh8496
Copy link
Author

kyh8496 commented May 11, 2021

#83 PR was checked. But it hasn't been solved. It seems to be a problem that occurs when the Intent is not null.

@akexorcist
Copy link
Owner

1.2.10 is live. please check on your project and don't forget to give me a feedback.

@akexorcist
Copy link
Owner

Since AndroidX AppCompat has per-app language preferences for backward compatibility. Please migrate this library to AndroidX for more stability, compatibility, and longer support from Google team.

See Migrate to AndroidX guide

Thank you for your support

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants