title: Detect supported audio encoders on Android to prevent crash "The given audio encoder 2 is not found"
body: <p>When an Android device does not support a mandatory audio-encoder, you get:
  (X=numeric index of the encoder)</p>
  
  <p>E/MediaProfiles(4048): The given audio encoder X is not found
   A/AudioSource(4048): frameworks/base/media/libstagefright/AudioSource.cpp:58 CHECK(channels == 1 || channels == 2) failed.
   A/libc(4048): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1)
  In native code. No Exception to react to. App is just force closed.</p>
  
  <p>Is there any way to query an Android >3.x device if 
  AAC
  AMR-NB and
  AMR-WB 
  are actually supported?
  Documentation ( <a href="http://developer.android.com/guide/appendix/media-formats.html" rel="nofollow noreferrer">http://developer.android.com/guide/appendix/media-formats.html</a> )
  says that these are core media formats and thus always supported.
  Some actual and common phones out there (of major brands) don't.</p>
  
  <p><a href="http://developer.android.com/reference/android/media/MediaCodec.html#createByCodecName%28java.lang.String%29" rel="nofollow noreferrer"><code>MediaCodec.createByCodecName(String name)</code></a> and
  <a href="https://stackoverflow.com/questions/11791473/get-supported-codec-for-android-device">Get supported Codec for Android device</a>
  only works with API16=Android 4.1 but the devices in question are 4.0.x .
  It also does not list AMR-NB and AAC.</p>