title: Android: How do I call a method which is existing in other API Level?
body: <p>I have application using Android 2.1 which utilize LocationManager to get the altitude. But now, I need to obtain the altitude using SensorManager which requires API Level 9 (2.3).</p>
  
  <p>How can I put the <code>SensorManager.getAltitude(float, float)</code> in my 2.1 android application by putting a condition and calling it by a function name (possible in normal Java)?</p>
  
  <p>Thank you in advance</p>
  
  <p><strong>UPDATE 1</strong>
  If you have noticed that my application need to be compiled using Android 2.1. That's why I'm looking for a way to call the function by name or in any other way that can be compiled.</p>