Sha256: 10add9bc31a56173bfe97cfe78bd2ff3706517f25ad7f0be7da4ff35d19254ff
Contents?: true
Size: 473 Bytes
Versions: 17
Compression:
Stored size: 473 Bytes
Contents
class Accelerometer attr_accessor :sensor, :rate include Droiuby::Wrappers::Listeners def initialize @native = _execution_bundle.getSensor(Java::Sensor.TYPE_ACCELEROMETER) end def on(event, &block) unless @listener @listener = Droiuby::Wrappers::Listeners::AutoWrapMultiple.new(_execution_bundle) @native.registerListener(@listener.to_native('SensorEventListener'), @sensor, @rate) end @listener.impl(event, &block) end end
Version data entries
17 entries across 17 versions & 1 rubygems