Last active
December 26, 2015 00:29
-
-
Save ishitcno1/7064044 to your computer and use it in GitHub Desktop.
Get vendors and names of all sensors of an android device.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private String getSensorInfo(SensorManager sensorManager) { | |
Iterator iterator = sensorManager.getSensorList(Sensor.TYPE_ALL).iterator(); | |
Sensor sensor; | |
String s = ""; | |
while (iterator.hasNext()) { | |
sensor = (Sensor)iterator.next(); | |
s = s + sensor.getName() + " MADE BY " + sensor.getVendor() + "\n"; | |
} | |
return s; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment