android :: ASensorManager :: defaultinit
# Manages the sensors
extern class ASensorManager `{ASensorManager*`}
new get_instance: ASensorManager `{return ASensorManager_getInstance();`}
# Returns the list of available sensors
fun get_sensor_list: Pointer `{
ASensorList *list;
ASensorManager_getSensorList(self, list);
return list;
`}
# Create a new sensor event queue and associate it with a looper
fun create_event_queue(app: NativeAppGlue): ASensorEventQueue `{
return ASensorManager_createEventQueue(self, app->looper, LOOPER_ID_USER, NULL, NULL);
`}
# Returns the default sensor of the given type
fun get_default_sensor(sensortype: ASensorType): ASensor `{
return ASensorManager_getDefaultSensor(self, sensortype);
`}
# Destroys the event queue and free all resources associated to it
fun destroy_event_queue(queue: ASensorEventQueue) `{
ASensorManager_destroyEventQueue(self, queue);
`}
end
lib/android/sensors.nit:61,1--87,3