Code example for Sensor

Methods: getMaximumRange

0
 
    } 
 
    public void onSensorChanged(SensorEvent event) {
    	final SensorEvent ev = event;
        final float c = -mAccelerometer.getMaximumRange() / 2.0f;
        //queueEvent(new Runnable() { 
        //    public void run() { 
        //        MetaAndroidWrapperNativeLib.accelerate(ev.values[0]/c, ev.values[1]/c, ev.values[2]/c); 
        //    } 
        //}); 
    } 
 
	@Override 
	public void onResume() { 
		super.onResume(); 
		mSensorManager.registerListener(this, mAccelerometer, SensorManager.SENSOR_DELAY_NORMAL);
 
		queueEvent(new Runnable() {
			public void run() { 
				MetaAndroidWrapperNativeLib.resume();