https://kotlinlang.org logo
w

Will Nixon

06/15/2021, 3:27 PM
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

Alejandro Rios

06/15/2021, 3:35 PM
Not Kotlin related, for that specific case could be an issue related to Play Services
z

Zach Klippenstein (he/him) [MOD]

06/15/2021, 3:36 PM
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

Will Nixon

06/15/2021, 3:38 PM
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

Zun

06/15/2021, 4:45 PM
Samsung was famous for this (on my app). I am mostly experiencing this on huawei too.
w

Will Nixon

06/15/2021, 4:46 PM
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

wiktorl4z

06/15/2021, 8:40 PM
Can you tell crash type? If native you can't do anything just report to Huawei.
m

Minhaj

06/16/2021, 4:05 AM
you can integrate crashlaytics to find out crash.
j

Jeremy

06/16/2021, 4:17 PM
you can use a device cloud service like bitbar to test on specific devices
r

Rak

06/22/2021, 3:39 PM
A couple of months ago, I used Encrypted Shared Prefs. Worked fine for me but it crashed on certain phones.
w

Will Nixon

06/22/2021, 3:42 PM
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
2 Views