title: SensorManager.getRotationMatrix always return false on Android Emulator
body: <p>I try to get orientation on my Android Emulator by <code>SensorManager.getOrientation</code>. Before this i use <code>SensorManager.getRotationMatrix</code> to get rotation matrix, but this always return <code>false</code>.
  Here is code of my Activity:
  <pre><code>
  public class MainActivity extends Activity implements SurfaceHolder.Callback,  View.OnClickListener{</p>
  
  public final static String DEBUG_TAG = "MainActivity";
  
  private SensorManager sensorManager;
  private SurfaceView preview;
  private float[] mGravs;
  private float[] mGeoMags;
  private float[] mRotationM;
  private float[] mOrientation;
  
  private Sensor mAccelerometer;
  private Sensor mMagneticField;
  
  @Override
  protected void onCreate(Bundle savedInstanceState)
  {
      super.onCreate(savedInstanceState);
      getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
      requestWindowFeature(Window.FEATURE_NO_TITLE);
  
      setContentView(R.layout.activity_main);
  
      preview = (SurfaceView)findViewById(R.id.SurfaceView1);
  
      sensorManager = (SensorManager)getSystemService(SENSOR_SERVICE);
  
      mAccelerometer = sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
      mMagneticField = sensorManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD);
  
      mGravs = new float[3];
      mGeoMags = new float[3];
      mRotationM = new float[16];
      mOrientation = new float[3];
  
      List&lt;Sensor&gt; sensorList = sensorManager.getSensorList(Sensor.TYPE_ALL);
      for (int nI = 0; nI &lt; sensorList.size(); nI++) {
          Log.d(DEBUG_TAG, sensorList.get(nI).getName());
      }
  }
  
  private SensorEventListener sensorEventListener = new SensorEventListener() {
      @Override
      public void onSensorChanged(SensorEvent event)
      {
          synchronized (this) {
              switch (event.sensor.getType()) {
              case Sensor.TYPE_ACCELEROMETER:
                  System.arraycopy(event.values, 0, mGravs, 0, 3);
                  break;
              case Sensor.TYPE_MAGNETIC_FIELD:
                  System.arraycopy(event.values, 0, mGeoMags, 0, 3);
                  break;
              default:
                  return;
              }
              if (mGravs != null &amp;&amp; mGeoMags != null) {
                  boolean bSuccess = SensorManager.getRotationMatrix(mRotationM, null, mGravs, mGeoMags);
                  if (bSuccess) {
                      SensorManager.getOrientation(mRotationM, mOrientation);
                  }
              }
          }
      }
  
      @Override
      public void onAccuracyChanged(Sensor sensor, int accuracy) {
          // TODO Auto-generated method stub
  
      }
  };
  
  private boolean openHardware()
  {
      sensorManager.registerListener(sensorEventListener, mAccelerometer, SensorManager.SENSOR_DELAY_NORMAL);
      sensorManager.registerListener(sensorEventListener, mMagneticField, SensorManager.SENSOR_DELAY_NORMAL);
      return true;
  }
  
  private void closeHardware()
  {
      sensorManager.unregisterListener(sensorEventListener);
  }
  
  @Override
  protected void onResume()
  {
      super.onResume();
      openHardware();
  }
  
  @Override
  protected void onPause()
  {
      super.onPause();
      closeHardware();
  }
  
  @Override
  protected void onStop()
  {
      closeHardware();
      super.onStop();
  }
   }
  </code></pre>
  
  <p>Ok, this problem occur because magnetic field sensor always return [0.0, 0.0, 0.0].
  How can i make magnetic field sensor return something else?</p>