본문 바로가기

@capgo/capacitor-bluetooth-low-energy

Bluetooth 기기 스캔, 연결, 읽기, 쓰기, 알림 수신을 위한 모든 기능을 갖춘 BLE 플러그인

Bluetooth 기기 스캔, 연결, 읽기, 쓰기, 알림 수신을 위한 모든 기능을 갖춘 BLE 플러그인

시작하기 initialize() 그리고 아래에 나열된 다른 핵심 메서드도 살펴보세요.

플랫폼지원참고 사항
iOS지원네이티브
Android지원네이티브
웹아니요Capacitor.getPlatform()으로 보호하세요
  • initialize - BLE 플러그인을 초기화합니다. 다른 메서드를 호출하기 전에 반드시 먼저 호출해야 합니다.
  • shimWebBluetooth - Capacitor Web Bluetooth shim을 설치하세요. navigator.bluetooth. Capacitor 네이티브 앱에서 Web Bluetooth API를 사용하기 전에 직접 호출하세요.
  • isAvailable - 기기에 Bluetooth가 사용 가능한지 확인합니다.
  • isEnabled - 기기에 Bluetooth가 활성화되어 있는지 확인합니다.
메서드설명
initializeBLE 플러그인을 초기화합니다. 다른 메서드를 호출하기 전에 반드시 실행해야 합니다.
shimWebBluetoothCapacitor Web Bluetooth shim을 다음에 설치합니다 navigator.bluetooth. Capacitor 네이티브 앱에서 Web Bluetooth API를 사용하기 전에 직접 호출하세요.
isAvailable기기에서 Bluetooth를 사용할 수 있는지 확인합니다.
isEnabled기기의 Bluetooth 활성화 여부를 확인합니다.
isLocationEnabled위치 서비스 활성화 여부를 확인합니다 (Android 전용).
openAppSettings앱 설정 페이지를 엽니다.
openBluetoothSettingsBluetooth 설정 페이지를 엽니다 (Android 전용).
openLocationSettings위치 설정 페이지를 엽니다 (Android 전용).
checkPermissions현재 권한 상태를 확인합니다.
requestPermissionsBluetooth 권한을 요청합니다.
startScanBLE 디바이스 스캔 시작.
stopScanBLE 디바이스 스캔 중지.
connectBLE 디바이스에 연결.
disconnectBLE 디바이스 연결 해제.
createBondBLE 기기와 본딩합니다 (Android 전용).
isBonded기기가 본딩되었는지 확인합니다 (Android 전용).
discoverServices연결된 기기에서 서비스를 검색합니다.
getServices기기에서 검색된 서비스 목록을 가져옵니다.
getConnectedDevices연결된 디바이스 목록을 가져옵니다.
readCharacteristicCharacteristic 값을 읽습니다.
writeCharacteristicCharacteristic에 값을 씁니다.
startCharacteristicNotificationsCharacteristic 알림을 시작합니다.
stopCharacteristicNotificationscharacteristic의 알림을 중지합니다.
readDescriptordescriptor 값을 읽습니다.
writeDescriptordescriptor에 값을 씁니다.
readRssi연결된 장치의 RSSI(신호 강도)를 읽습니다.
requestMtuMTU 크기 변경을 요청합니다 (Android 전용).
requestConnectionPriority연결 우선순위를 요청합니다 (Android 전용).
startAdvertisingPeripheral(BLE server)로 advertising을 시작합니다.
stopAdvertisingAdvertising을 중지합니다.
startForegroundService백그라운드에서 BLE 연결을 유지하기 위해 포그라운드 서비스를 시작합니다 (Android 전용).
stopForegroundService포그라운드 서비스를 중지합니다 (Android 전용).
getPluginVersion네이티브 Capacitor 플러그인 버전을 가져옵니다.
addListener디바이스 스캔 이벤트 리스너를 추가합니다.
addListener디바이스 연결 이벤트 리스너를 추가합니다.
addListener디바이스 연결 해제 이벤트 리스너를 추가합니다.
addListenerCharacteristic 변경 이벤트 리스너를 추가합니다.
removeAllListeners이 플러그인의 모든 리스너를 제거합니다.

이 레퍼런스는 다음에서 동기화됩니다. src/definitions.ts 에서 capacitor-bluetooth-low-energy.

@capgo/capacitor-bluetooth-low-energy에서 계속하기

“@capgo/capacitor-bluetooth-low-energy에서 계속하기” 섹션

사용 중이라면 @capgo/capacitor-bluetooth-low-energy 마이그레이션과 엔터프라이즈 운영을 계획하려면 다음과 연결하세요: @capgo/capacitor-bluetooth-low-energy 사용하기 @capgo/capacitor-bluetooth-low-energy 사용하기의 네이티브 기능을 위한, Capgo 엔터프라이즈 Capgo Enterprise의 제품 워크플로우를 위해, Ionic Enterprise 플러그인 대안 Ionic Enterprise 플러그인 대안의 제품 워크플로우를 위해, Capgo 대안 Capgo 대안의 제품 워크플로우를 위해, 그리고 Capgo 컨설팅 Capgo Consulting의 제품 워크플로우를 위해.