-1

So, consider the common scenario where you want to build an app using the latest Android APIs (up to 18), but you must also provide support back to Android 2.x.

This is the case for my current app. I had set my minSdk and targetApi levels accordingly and started work.

During testing on various device I noticed some crashes due missing functions/apis on older devices. I had to visit each bug and provide a workarounds on a case by case basis. A real pain as all these were only discovered during test.

So, my question is what is your process for developing in Android with this in mind. I haven't really explored lint but could that help point out any possible issues.

Thanks.

Andy G
  • 19,232
  • 5
  • 47
  • 69
jim
  • 8,670
  • 15
  • 78
  • 149
  • 1
    For APIs not existing on older versions Lint works wonders. But for things like policy changes (like Async tasks executing in parallel or serial which has changed twice), changing the meaning of return values (for example getDisplaySize), or version specific bugs nothing will find it but testing. If you're doing Android work it pays to buy a variety of screen sizes, OEMS, and OS versions for testing. – Gabe Sechan Aug 29 '13 at 23:09
  • Cool, thanks. Oh man, please don't mention Async task. I spent at least one day trying to figure out the parallel change.. P.S. Where the best place to keep up to date on this, android-developers.blogspot.ie ? Thanks. – jim Aug 29 '13 at 23:23

1 Answers1

1

I haven't really explored lint but could that help point out any possible issues.

It will. Lint will report to you anything that you use that is newer than your android:minSdkVersion but is acceptable to your build target.

Lint will generally report this automatically for Eclipse, though you may want to run Lint manually from time to time, as sometimes it seems to miss some stuff. Lint is also available for command-line builds, and I presume that it is (or will be) integrated into Android Studio.

You can read more about Lint in the developer documentation.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • Greats stuff, I'll have to get into the habit of running lint every so often. Cheers. – jim Aug 29 '13 at 23:23