List of usage examples for android.hardware Sensor toString
@Override
public String toString()
From source file:com.commonsware.android.sensor.monitor.MainActivity.java
@Override public List<Sensor> getSensorList() { List<Sensor> unfiltered = new ArrayList<Sensor>(mgr.getSensorList(Sensor.TYPE_ALL)); List<Sensor> result = new ArrayList<Sensor>(); for (Sensor s : unfiltered) { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT || !isTriggerSensor(s)) { result.add(s);//from w ww .j av a 2s. co m } } Collections.sort(result, new Comparator<Sensor>() { @Override public int compare(final Sensor a, final Sensor b) { return (a.toString().compareTo(b.toString())); } }); return (result); }
From source file:alaindc.crowdroid.SensorsIntentService.java
public void onAccuracyChanged(Sensor sensor, int accuracy) { // Do something here if sensor accuracy changes. Log.d("SENSORS_INTENTSERVICE", sensor.toString()); }