WearOS: Application crashes on startup
See original GitHub issueHome Assistant Android version: 2021.12.3
Android version: 10
Android Wear version: 2.35.0.325323493
Phone model: Huawei P20 Pro
Watch model: LG Watch Urbane
Home Assistant version: 2021.12.7
Last working Home Assistant release (if known): n/a
Description of problem: Android Wear application crashes on launch. Does not get past the splash screen.
Traceback (if applicable, to get the logs you may refer to: https://companion.home-assistant.io/docs/troubleshooting/faqs/#android-crash-logs):
2021-12-30 13:05:26.697 15075-15075/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: io.homeassistant.companion.android, PID: 15075
java.lang.NumberFormatException: For input string: "public int android.view.ViewConfiguration.getScaledScrollFactor()"
at java.lang.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1306)
at java.lang.Float.parseFloat(Float.java:459)
at io.homeassistant.companion.android.util.RotaryEventDispatcherKt$scrollHandler$1.invoke(RotaryEventDispatcher.kt:29)
at io.homeassistant.companion.android.util.RotaryEventDispatcherKt$scrollHandler$1.invoke(RotaryEventDispatcher.kt:21)
Full logs: ha-wearos-crash.log
Screenshot of problem: n/a
Additional information:
The Android Wear application was fully configured using the Home Assistant Android application on the phone because my installation uses MFA.
The Home Assistant installation is still in its infancy. Only one light is configured there.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (4 by maintainers)
Top GitHub Comments
The root cause is not about rotary bezels, feelings, or whether it is better or worse. It’s really a backward compatibility issue.
The vertical scrolling factor reading code, as it is written today, does not work with older Android/Wear versions because the Java reflection API is being used incorrectly. The mistake is easy to overlook but also easy to fix.
I’ll submit a PR next week.
Happy new year.
A sexta, 31 de dez de 2021, 17:20, Daniel Shokouhi @.***> escreveu:
The watch does not have a working/rotary bezel if that’s what you mean. See: https://www.lg.com/us/smart-watches/lg-W150-lg-watch-urbane
Daniel Shokouhi @.***> escreveu no dia quinta, 30/12/2021 à(s) 20:21: