-
Notifications
You must be signed in to change notification settings - Fork 1
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
Fix Crash when Rotating from Portrait to Landscape Mode #30
Conversation
Signed-off-by: Andre Weber <andre.weber3@etas.com>
The App crashed due to the Android DataStore being re-instantiated during the recreation of the Activity. This has been fixed by using Hilt for Dependency Injection to create the DataStore as a Singleton. Closes: eclipse-kuksa#26 Signed-off-by: Andre Weber <andre.weber3@etas.com>
Even though Hilt was added now let's always keep in mind not to "over-abuse" it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me with emulated Pixel 3a!
Code looks good, at least I understood what is done (after googling some stuff). I think it's the best solution to #26
@@ -34,8 +36,8 @@ android { | |||
applicationId = "org.eclipse.kuksa.companion" | |||
minSdk = 27 | |||
targetSdk = 33 | |||
versionCode = 1 | |||
versionName = "1.0" | |||
versionCode = rootProject.extra["projectVersionCode"].toString().toInt() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this I could not check/didn't know how to check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
found it in App Infos looks good :)
@SebastianSchildt |
Closes: #26