Handling different versions of Android

Most of the time throughout this book we haven't paid any attention to supporting older Android devices. The main reason being that all the up to date parts of the API we have been using work on such a high percentage of devices (in excess of 95%) it has not seemed worthwhile. Unless you intend carving out a niche, in apps for ancient Android relics this seems like a sensible approach. Regarding playing sounds however there have been some relatively recent modifications to the Android API.

Actually, this isn't immediately a big deal because devices newer than this can still use the old parts of the API. But it is good practice to specifically handle these differences in compatibility, because eventually, ...

Get Learning Java by Building Android Games - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.