Search code examples
javaandroidstandards

How far back do you support Android Apps?


Just curious as to standard practice for writing a new app.

Do you write your code to support all the way back to API 15 (Android 4) and try to support basically all Android platforms out there? Or is it mostly "code for the most recent and if someone complains, add back support"?

I'm using the java.time lib and am finding it's only available in Java API 26 (Android 8). Should I just use this directly? Or include code to check the phones version and add in code for those older versions?

Thanks!


Solution

  • As far back as it's convenient to support.

    If I can support an earlier version by avoiding the use of some minor convenience added in later versions, I'll typically support the old versions without a second thought. A practical way to approach this is to set your minimum SDK version to something even lower than you think you might want to support, and gradually raise it as you encounter reasons to do so. I need a compelling reason to support older versions if doing so requires a significant amount of extra work.

    Know your target audience.

    The developer dashboard is useful, but it's not everything. I'm working on an app right now that I expect to be used on old, retired phones that people have dedicated to a specific hobby. That's an example of a compelling reason to support old Android versions. I've also worked on an app that needed to support Android 2.1 (when 6.0 was current) because the customers using it had a large investment in old hardware.