Hey all - probably a dumb question, but does anyon...
# android
w
Hey all - probably a dumb question, but does anyone here find that their app crashes on particular devices only? I have an app that crashes on a Huwawei device and a TCL device for the same reason, but doesn't happen on any other devices I've tested on (primarily google phones). How do you all solve those types of crash?
a
Not Kotlin related, for that specific case could be an issue related to Play Services
z
Yep, one of the joys of android development! Samsung is famous for this. Sometimes you can kind of figure out contract a device is breaking from the stacktrace. If you’re lucky, you can get your company to expense one of the problematic devices, or otherwise someone might have one laying around.
☝️ 1
w
haha that's what I suspected. One of the issues seems to be around focus management - seems crazy that one device would handle that differently from another - no idea how to even start figuring out what change to make specifically for huwawei devices 🙄
z
Samsung was famous for this (on my app). I am mostly experiencing this on huawei too.
w
How have you approached fixing things specifically on those devices? Just apply the fix "globally" and ensure that doesn't break things on all the other devices?!
w
Can you tell crash type? If native you can't do anything just report to Huawei.
m
you can integrate crashlaytics to find out crash.
j
you can use a device cloud service like bitbar to test on specific devices
r
A couple of months ago, I used Encrypted Shared Prefs. Worked fine for me but it crashed on certain phones.
w
I have 2 crashes that are similar in that they only affect certain devices: One has to do with focus management (I'm having to programmatically control focus on a text field to keep it from stealing focus when i don't want it to. The other seems to be an init issue with RevenueCat's Purchases SDK. Totally fine on most phones, but doesn't seem to initialize when expected on Huawei