List of usage examples for android.hardware SensorManager getSensorList
public List<Sensor> getSensorList(int type)
From source file:org.uguess.android.sysinfo.SiragonManager.java
private int getSensorState() { SensorManager sm = (SensorManager) getActivity().getSystemService(Context.SENSOR_SERVICE); if (sm != null) { List<Sensor> ss = sm.getSensorList(Sensor.TYPE_ALL); int c = 0; if (ss != null) { c = ss.size();// w ww . j a v a 2 s . co m } return c; } return -1; }