title: Checking Android version
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/3423754/retrieving-android-api-version-programmatically">Retrieving Android API version programmatically</a>  </p>
  </blockquote>
  
  
  
  <p>I need if the phone running the app api level is 14 which is android 4.0 or more ( example api levcel 15 ) then startActivity ... else if the api level is lower than 14 ( example 13 ), then startActivity ...</p>
  
  <pre><code>                String AndroidVersion = android.os.Build.VERSION.RELEASE;
                  if ( AndroidVersion == 4.0 ) {
                      Intent start = new Intent(S.this, Menu.class);
                      startActivity(start);                       
                  }
                  else {
                      Intent startt = new Intent(S.this, Menu2.class);
                      startActivity(startt);
                  }
  </code></pre>
  
  <p>whats the wrong ?</p>