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

App crashes when Geo question tries to open Mapbox on Android 4.x #3246

Closed
mmarciniak90 opened this issue Jul 25, 2019 · 3 comments · Fixed by #3247
Closed

App crashes when Geo question tries to open Mapbox on Android 4.x #3246

mmarciniak90 opened this issue Jul 25, 2019 · 3 comments · Fixed by #3247

Comments

@mmarciniak90
Copy link
Contributor

Software and hardware versions

Collect v1.23 - master
Android v4.x

Problem description

App crashes when the user opens some Goe question when Mapbox is set

Steps to reproduce the problem

  1. The user goes to General Settings > Maps
  2. User sets Mapbox
  3. User opens GeoPoint / GeoTrace or GeoShape question
  4. User clicks on the button to open map
  5. App crashes

Screenshot from 2019-07-25 12-53-22

Expected behavior

Collect does not crash

Other information

Probably missed during testing #3164

@zestyping
Copy link
Contributor

Oh dear. I didn't realize we couldn't use vectors. @lognaturel I assume this means we can't rely on vector drawables, and the solution is to use a bitmap instead?

@lognaturel
Copy link
Member

lognaturel commented Jul 25, 2019

@zestyping I'm really surprised by this and not immediately seeing the root cause. ContextCompat.getDrawable looks like it should handle all API levels.

Do you have a way of trying this out? Maybe https://developer.android.com/reference/android/support/v7/content/res/AppCompatResources.html#getDrawable(android.content.Context,%20int) does the trick?

@zestyping
Copy link
Contributor

It took some doing, but I was finally able to get it up in a 4.4 emulator and replicate this crash. Pushing a fix for your review now.

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