Code example for SensorManager

Methods: unregisterListener

0
        mSensorManager.registerListener(this, mRotationVectorSensor, 10000);
    } 
 
    @Override 
    public void pause() { 
        mSensorManager.unregisterListener(this);
    } 
 
    @Override 
    protected void onAttachedToWindow() { 
        super.onAttachedToWindow(); 
        ensureRenderScript(); 
    } 
 
    @Override 
    public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {
        super.surfaceChanged(holder, format, w, h);
        mRender.surfaceChanged();
    } 
 
    @Override