Android Open Source - HexNanoController_Android Sensor Manager Wrapper

From Project

Back to project page HexNanoController_Android.


The source code is released under:

Code license GNU GPL v2 Content license CC BY-NC-SA 4.0

If you think the Android project HexNanoController_Android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.hexairbot.hexmini.sensors;
//from  w w  w  .  j a va2s . c om
import android.hardware.SensorEventListener;
import android.os.Handler;

public abstract class SensorManagerWrapper
    private boolean isGyroAvailable;
    private boolean isMagnetoAvailable;
    private boolean isAcceleroAvailable;

     * @param theListener
     * @param theType
     * @return true if sensor was registered
    public abstract boolean registerListener(final SensorEventListener theListener, int theType, Handler handler);

    public abstract void unregisterListener(final SensorEventListener theListener);

    public abstract void onCreate();
    public abstract void onDestroy();
    public abstract void onPause();
    public abstract void onResume();

    public boolean isGyroAvailable()
        return isGyroAvailable;

    public void setGyroAvailable(boolean isGyroAvailable)
        this.isGyroAvailable = isGyroAvailable;

    public boolean isMagnetoAvailable()
        return isMagnetoAvailable;

    public void setMagnetoAvailable(boolean isMagnetoAvailable)
        this.isMagnetoAvailable = isMagnetoAvailable;

    public boolean isAcceleroAvailable()
        return isAcceleroAvailable;

    public void setAcceleroAvailable(boolean isAcceleroAvailable)
        this.isAcceleroAvailable = isAcceleroAvailable;

Java Source Code List