Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration changes ignore? #5

Open
hulkdx opened this issue Jun 28, 2024 · 6 comments
Open

Configuration changes ignore? #5

hulkdx opened this issue Jun 28, 2024 · 6 comments

Comments

@hulkdx
Copy link

hulkdx commented Jun 28, 2024

android:configChanges="orientation|screenSize|screenLayout|keyboardHidden|mnc|colorMode|density|fontScale|fontWeightAdjustment|keyboard|layoutDirection|locale|mcc|navigation|smallestScreenSize|touchscreen|uiMode"

Why this is added? If you remove this and try to rotate the device koin will cause a crash:

Caused by: org.koin.core.error.KoinAppAlreadyStartedException: Trying to run new Koin Application whereas Koin is already started. Use 'KoinContext()' instead of check for any 'startKoin' usage.

I don't think so ignoring configuration changes is a good idea.

@razaghimahdi
Copy link
Owner

Hi there, thank u for letting me know. I'll fix it ASAP, then I'll give u updates

@razaghimahdi
Copy link
Owner

Actually, I didn't notice any crash while rotating. would u please give me more info? where this happens ?

@hulkdx
Copy link
Author

hulkdx commented Jul 1, 2024

Actually, I didn't notice any crash while rotating. would u please give me more info? where this happens ?

I mean if you remove this line, the app would crash on rotation

@razaghimahdi
Copy link
Owner

Do not remove whole line, just remove orientation|

@hulkdx
Copy link
Author

hulkdx commented Jul 2, 2024

Actually your koin version is old so if you update your koin-compose you notice the crash with removing this line, its possibly due to the koin itself, probably using KoinApplication can cause it.

InsertKoinIO/koin#1884

Removing KoinApplicaion in compose and replacing it with startKoin on androidapplication would fix it though

@razaghimahdi
Copy link
Owner

Thank u for letting me know, I'll check it.

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

No branches or pull requests

2 participants