| /expo/packages/expo-sensors/src/__tests__/ |
| H A D | DeviceSensor-test.native.ts | 9 const subscription1 = sensor.addListener(() => {}); 10 expect(sensor.hasListeners()).toBe(true); 11 expect(sensor.getListenerCount()).toBe(1); 13 const subscription2 = sensor.addListener(() => {}); 14 sensor.addListener(() => {}); 15 expect(sensor.getListenerCount()).toBe(3); 19 expect(sensor.getListenerCount()).toBe(2); 21 sensor.removeSubscription(subscription1); 22 expect(sensor.getListenerCount()).toBe(1); 24 sensor.removeAllListeners(); [all …]
|
| H A D | DeviceSensor-test.ios.ts | 6 const sensor = new DeviceSensor(nativeModule, 'mockDidUpdate'); constant 9 const subscription1 = sensor.addListener(() => {}); 12 sensor.addListener(() => {}); 13 sensor.addListener(() => {}); 21 sensor.removeAllListeners(); 27 const sensor = new DeviceSensor(nativeModule, 'mockDidUpdate'); constant 33 const subscription1 = sensor.addListener(() => {}); 35 const subscription2 = sensor.addListener(() => {}); 50 const subscription = sensor.addListener(() => {}); 51 expect(sensor.hasListeners()).toBe(true); [all …]
|
| H A D | DeviceSensor-test.android.ts | 6 const sensor = new DeviceSensor(nativeModule, 'mockDidUpdate'); constant 12 const subscription1 = sensor.addListener(() => {}); 14 const subscription2 = sensor.addListener(() => {}); 26 const sensor = new DeviceSensor(nativeModule, 'mockDidUpdate'); constant 32 sensor.addListener(() => {}); 34 sensor.addListener(() => {}); 39 sensor.removeAllListeners(); 41 expect(sensor.hasListeners()).toBe(false);
|
| /expo/android/vendored/sdk49/react-native-reanimated/android/src/main/java/abi49_0_0/com/swmansion/reanimated/sensor/ |
| H A D | ReanimatedSensorContainer.java | 1 package abi49_0_0.com.swmansion.reanimated.sensor; 20 ReanimatedSensor sensor = new ReanimatedSensor(reactContext, sensorType, interval, setter); in registerSensor() local 22 if (sensor.initialize()) { in registerSensor() 25 sensors.put(sensorId, sensor); in registerSensor() 31 ReanimatedSensor sensor = sensors.get(sensorId); in unregisterSensor() local 32 if (sensor != null) { in unregisterSensor() 33 sensor.cancel(); in unregisterSensor()
|
| H A D | ReanimatedSensor.java | 1 package abi49_0_0.com.swmansion.reanimated.sensor; 17 Sensor sensor; field in ReanimatedSensor 40 sensor = sensorManager.getDefaultSensor(sensorType.getType()); in initialize() 41 if (sensor != null) { in initialize() 42 sensorManager.registerListener(listener, sensor, interval * 1000); in initialize() 49 sensorManager.unregisterListener(listener, sensor); in cancel()
|
| /expo/android/vendored/unversioned/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/sensor/ |
| H A D | ReanimatedSensorContainer.java | 1 package com.swmansion.reanimated.sensor; 20 ReanimatedSensor sensor = new ReanimatedSensor(reactContext, sensorType, interval, setter); in registerSensor() local 22 if (sensor.initialize()) { in registerSensor() 25 sensors.put(sensorId, sensor); in registerSensor() 31 ReanimatedSensor sensor = sensors.get(sensorId); in unregisterSensor() local 32 if (sensor != null) { in unregisterSensor() 33 sensor.cancel(); in unregisterSensor()
|
| H A D | ReanimatedSensor.java | 1 package com.swmansion.reanimated.sensor; 17 Sensor sensor; field in ReanimatedSensor 40 sensor = sensorManager.getDefaultSensor(sensorType.getType()); in initialize() 41 if (sensor != null) { in initialize() 42 sensorManager.registerListener(listener, sensor, interval * 1000); in initialize() 49 sensorManager.unregisterListener(listener, sensor); in cancel()
|
| /expo/android/vendored/sdk48/react-native-reanimated/android/src/main/java/abi48_0_0/com/swmansion/reanimated/sensor/ |
| H A D | ReanimatedSensorContainer.java | 1 package abi48_0_0.com.swmansion.reanimated.sensor; 21 ReanimatedSensor sensor = new ReanimatedSensor(reactContext, sensorType, interval, setter); in registerSensor() local 23 if (sensor.initialize()) { in registerSensor() 26 sensors.put(sensorId, sensor); in registerSensor() 32 ReanimatedSensor sensor = sensors.get(sensorId); in unregisterSensor() local 33 if (sensor != null) { in unregisterSensor() 34 sensor.cancel(); in unregisterSensor()
|
| H A D | ReanimatedSensor.java | 1 package abi48_0_0.com.swmansion.reanimated.sensor; 13 Sensor sensor; field in ReanimatedSensor 34 sensor = sensorManager.getDefaultSensor(sensorType.getType()); in initialize() 35 if (sensor != null) { in initialize() 36 sensorManager.registerListener(listener, sensor, interval * 1000); in initialize() 43 sensorManager.unregisterListener(listener, sensor); in cancel()
|
| /expo/android/vendored/sdk47/react-native-reanimated/android/src/main/java/abi47_0_0/com/swmansion/reanimated/sensor/ |
| H A D | ReanimatedSensor.java | 1 package abi47_0_0.com.swmansion.reanimated.sensor; 13 Sensor sensor; field in ReanimatedSensor 34 sensor = sensorManager.getDefaultSensor(sensorType.getType()); in initialize() 35 if (sensor != null) { in initialize() 36 sensorManager.registerListener(listener, sensor, interval * 1000); in initialize() 43 sensorManager.unregisterListener(listener, sensor); in cancel()
|
| H A D | ReanimatedSensorContainer.java | 1 package abi47_0_0.com.swmansion.reanimated.sensor; 21 ReanimatedSensor sensor = new ReanimatedSensor(reactContext, sensorType, interval, setter); in registerSensor() local 23 if (sensor.initialize()) { in registerSensor() 32 ReanimatedSensor sensor = sensors.get(sensorId); in unregisterSensor() local 33 if (sensor != null) { in unregisterSensor() 34 sensor.cancel(); in unregisterSensor()
|
| H A D | ReanimatedSensorListener.java | 1 package abi47_0_0.com.swmansion.reanimated.sensor; 30 int sensorType = event.sensor.getType(); in onSensorChanged() 53 public void onAccuracyChanged(Sensor sensor, int accuracy) {} in onAccuracyChanged() argument
|
| /expo/packages/expo-sensors/android/src/main/java/expo/modules/sensors/services/ |
| H A D | SubscribableSensorService.kt | 48 if (sensorEvent.sensor.type == sensorType) { in onSensorChanged() 63 override fun onAccuracyChanged(sensor: Sensor, accuracy: Int) { in onAccuracyChanged() 64 if (sensor.type == sensorType) { in onAccuracyChanged() 67 subscription.sensorEventListener.onAccuracyChanged(sensor, accuracy) in onAccuracyChanged() 73 override fun onFlushCompleted(sensor: Sensor) { in onFlushCompleted() 74 if (sensor.type == sensorType) { in onFlushCompleted() 77 subscription.sensorEventListener.onFlushCompleted(sensor) in onFlushCompleted()
|
| /expo/android/versioned-abis/expoview-abi47_0_0/src/main/java/abi47_0_0/expo/modules/sensors/services/ |
| H A D | SubscribableSensorService.kt | 48 if (sensorEvent.sensor.type == sensorType) { in onSensorChanged() 63 override fun onAccuracyChanged(sensor: Sensor, accuracy: Int) { in onAccuracyChanged() 64 if (sensor.type == sensorType) { in onAccuracyChanged() 67 subscription.sensorEventListener.onAccuracyChanged(sensor, accuracy) in onAccuracyChanged() 73 override fun onFlushCompleted(sensor: Sensor) { in onFlushCompleted() 74 if (sensor.type == sensorType) { in onFlushCompleted() 77 subscription.sensorEventListener.onFlushCompleted(sensor) in onFlushCompleted()
|
| /expo/android/versioned-abis/expoview-abi48_0_0/src/main/java/abi48_0_0/expo/modules/sensors/services/ |
| H A D | SubscribableSensorService.kt | 48 if (sensorEvent.sensor.type == sensorType) { in onSensorChanged() 63 override fun onAccuracyChanged(sensor: Sensor, accuracy: Int) { in onAccuracyChanged() 64 if (sensor.type == sensorType) { in onAccuracyChanged() 67 subscription.sensorEventListener.onAccuracyChanged(sensor, accuracy) in onAccuracyChanged() 73 override fun onFlushCompleted(sensor: Sensor) { in onFlushCompleted() 74 if (sensor.type == sensorType) { in onFlushCompleted() 77 subscription.sensorEventListener.onFlushCompleted(sensor) in onFlushCompleted()
|
| /expo/android/versioned-abis/expoview-abi49_0_0/src/main/java/abi49_0_0/expo/modules/sensors/services/ |
| H A D | SubscribableSensorService.kt | 48 if (sensorEvent.sensor.type == sensorType) { in onSensorChanged() 63 override fun onAccuracyChanged(sensor: Sensor, accuracy: Int) { in onAccuracyChanged() 64 if (sensor.type == sensorType) { in onAccuracyChanged() 67 subscription.sensorEventListener.onAccuracyChanged(sensor, accuracy) in onAccuracyChanged() 73 override fun onFlushCompleted(sensor: Sensor) { in onFlushCompleted() 74 if (sensor.type == sensorType) { in onFlushCompleted() 77 subscription.sensorEventListener.onFlushCompleted(sensor) in onFlushCompleted()
|
| /expo/android/expoview/src/main/java/host/exp/exponent/kernel/services/sensors/ |
| H A D | BaseSensorKernelService.kt | 15 private var sensor: Sensor? = null variable 24 sensor = sensorManager.getDefaultSensor(sensorType) in onSensorDataChanged() 25 if (sensor != null) { in onSensorDataChanged() 26 sensorManager.registerListener(this, sensor, samplingPeriodUs) in onSensorDataChanged() 49 override fun onAccuracyChanged(sensor: Sensor, accuracy: Int) {} in onAccuracyChanged()
|
| /expo/ios/vendored/sdk47/react-native-reanimated/ios/sensor/ |
| H A D | ABI47_0_0ReanimatedSensorContainer.m | 19 …ABI47_0_0ReanimatedSensor *sensor = [[ABI47_0_0ReanimatedSensor alloc] init:sensorType interval:in… 20 if ([sensor initialize]) { 23 [_sensors setObject:sensor forKey:sensorId];
|
| /expo/ios/vendored/sdk48/react-native-reanimated/ios/sensor/ |
| H A D | ABI48_0_0ReanimatedSensorContainer.m | 19 …ABI48_0_0ReanimatedSensor *sensor = [[ABI48_0_0ReanimatedSensor alloc] init:sensorType interval:in… 20 if ([sensor initialize]) { 23 [_sensors setObject:sensor forKey:sensorId];
|
| /expo/docs/pages/versions/unversioned/sdk/ |
| H A D | light-sensor.mdx | 3 description: A library that provides access to the device's light sensor. 14 `LightSensor` from `expo-sensors` provides access to the device's light sensor to respond to illumi… 60 <View style={styles.sensor}> 88 sensor: { 104 <APISection packageName="expo-light-sensor" />
|
| /expo/docs/pages/versions/v47.0.0/sdk/ |
| H A D | light-sensor.mdx | 3 description: A library that provides access to the device's light sensor. 14 `LightSensor` from `expo-sensors` provides access to the device's light sensor to respond to illumi… 60 <View style={styles.sensor}> 88 sensor: { 104 <APISection packageName="expo-light-sensor" />
|
| /expo/docs/pages/versions/v48.0.0/sdk/ |
| H A D | light-sensor.mdx | 3 description: A library that provides access to the device's light sensor. 14 `LightSensor` from `expo-sensors` provides access to the device's light sensor to respond to illumi… 60 <View style={styles.sensor}> 88 sensor: { 104 <APISection packageName="expo-light-sensor" />
|
| /expo/docs/pages/versions/v49.0.0/sdk/ |
| H A D | light-sensor.mdx | 3 description: A library that provides access to the device's light sensor. 14 `LightSensor` from `expo-sensors` provides access to the device's light sensor to respond to illumi… 60 <View style={styles.sensor}> 88 sensor: { 104 <APISection packageName="expo-light-sensor" />
|
| /expo/ios/vendored/unversioned/react-native-reanimated/ios/sensor/ |
| H A D | ReanimatedSensorContainer.m | 22 ReanimatedSensor *sensor = [[ReanimatedSensor alloc] init:sensorType 26 if ([sensor initialize]) { 29 [_sensors setObject:sensor forKey:sensorId];
|
| /expo/ios/vendored/sdk49/react-native-reanimated/ios/sensor/ |
| H A D | ABI49_0_0ReanimatedSensorContainer.m | 22 ABI49_0_0ReanimatedSensor *sensor = [[ABI49_0_0ReanimatedSensor alloc] init:sensorType 26 if ([sensor initialize]) { 29 [_sensors setObject:sensor forKey:sensorId];
|