Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.hardware.Sensor;

public class Main {
    public static boolean isSensorCompatible(Sensor sensor) {
        return sensor.getType() == Sensor.TYPE_STEP_COUNTER || sensor.getType() == Sensor.TYPE_STEP_DETECTOR
                || sensor.getType() == Sensor.TYPE_LIGHT || sensor.getType() == Sensor.TYPE_PRESSURE
                || sensor.getType() == Sensor.TYPE_RELATIVE_HUMIDITY
                || sensor.getType() == Sensor.TYPE_SIGNIFICANT_MOTION || sensor.getType() == Sensor.TYPE_GRAVITY;
    }
}