[android-developers] Re: How to keep the code base same for Lower and Higher API levels

2011-03-10 Thread lbendlin
Like this, for the audio manager (older API versions do not support audio fading) public static CustomAudioManager newInstance(Context context) { final int sdkVersion = Integer.parseInt(Build.VERSION.SDK); CustomAudioManager cam = null; if (sdkVersion 8)

[android-developers] Re: How to keep the code base same for Lower and Higher API levels

2011-03-10 Thread Jacob
Thank you; appreciate the input. I will try to use Java reflection. On Mar 10, 5:48 am, lbendlin l...@bendlin.us wrote: Like this, for the audio manager (older API versions do not support audio fading) public static CustomAudioManager newInstance(Context context) {         final int