amplitude / Amplitude-Flutter

Official Amplitude Flutter SDK
https://developers.amplitude.com/docs/flutter-setup
MIT License
119 stars 79 forks source link

minSdkVersion 16 is incorrect #24

Open bakua opened 4 years ago

bakua commented 4 years ago

Your android plugin defines minSdkVersion 16. However, you include dependency on com.squareup.okhttp3:okhttp:4.2.2 which supports only Android 21+. Running on device with Android api 16 ends up with java.lang.NoClassDefFoundError: java.util.Objects exception as Objects class is not present in the OS.

haoliu-amp commented 4 years ago

@bakua You're right, we will update it to 21. One question, do you need to support devices ranging from 16 - 21?

bakua commented 4 years ago

Well it is always nice being able to reach more users with a digital product. More importantly I don't know how the device segmentation looks like in emerging markets, maybe old androids make a significant portion?

Personally, I believe that since Flutter itself is 16+ then you guys want to be able to support all versions. I know that it is nice to have shiny latest okhttp there, but Amplitude is the only library I've run into that limits us to reach api 16 - 21 users.

haoliu-amp commented 4 years ago

Do you know how much percent of your users are on 16-21?

bakua commented 4 years ago

Before I've migrated to flutter it was about 0.5%. Which, if you are a high revenue business can pay for a developer or two.

Looking at https://gs.statcounter.com/android-version-market-share/mobile-tablet/africa there is cca 7% of people on api 16-21. So a lot of people in this emerging market.