Java tutorial
//package com.java2s; import android.content.Context; import android.hardware.Sensor; import android.hardware.SensorManager; public class Main { public static boolean isSupportAccelerometerSensor(Context context) { SensorManager sensorManager = (SensorManager) context.getSystemService(Context.SENSOR_SERVICE); return sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER) != null; } }