@neosyn-ee/capacitor-ibeacon
v1.0.6
Published
The plugin is designed to detect iBeacons in proximity, retrieve their metadata (UUID, major, minor, RSSI, estimated accuracy, and proximity), and notify the application when entering or exiting iBeacon regions.
Downloads
11
Readme
capacitor-ibeacon
The plugin is designed to detect iBeacons in proximity, retrieve their metadata (UUID, major, minor, RSSI, estimated accuracy, and proximity), and notify the application when entering or exiting iBeacon regions.
Install
npm install capacitor-ibeacon
npx cap syncAPI
startMonitoring(...)stopMonitoring(...)stopAllMonitoring()addListener('onBeaconsRanged', ...)addListener('onRegionEntered', ...)addListener('onRegionExited', ...)checkAuthorizationStatus()requestPermissions()- Interfaces
startMonitoring(...)
startMonitoring(options: { uuidString: string; major?: number; minor?: number; }) => Promise<void>| Param | Type |
| ------------- | -------------------------------------------------------------------- |
| options | { uuidString: string; major?: number; minor?: number; } |
stopMonitoring(...)
stopMonitoring(options: { uuid: string; }) => Promise<void>| Param | Type |
| ------------- | ------------------------------ |
| options | { uuid: string; } |
stopAllMonitoring()
stopAllMonitoring() => Promise<void>addListener('onBeaconsRanged', ...)
addListener(eventName: 'onBeaconsRanged', listenerFunc: (info: { beacons: BeaconInfo[]; }) => void) => PluginListenerHandle| Param | Type |
| ------------------ | ---------------------------------------------------------- |
| eventName | 'onBeaconsRanged' |
| listenerFunc | (info: { beacons: BeaconInfo[]; }) => void |
Returns: PluginListenerHandle
addListener('onRegionEntered', ...)
addListener(eventName: 'onRegionEntered', listenerFunc: (info: { identifier: string; }) => void) => PluginListenerHandle| Param | Type |
| ------------------ | ------------------------------------------------------- |
| eventName | 'onRegionEntered' |
| listenerFunc | (info: { identifier: string; }) => void |
Returns: PluginListenerHandle
addListener('onRegionExited', ...)
addListener(eventName: 'onRegionExited', listenerFunc: (info: { identifier: string; }) => void) => PluginListenerHandle| Param | Type |
| ------------------ | ------------------------------------------------------- |
| eventName | 'onRegionExited' |
| listenerFunc | (info: { identifier: string; }) => void |
Returns: PluginListenerHandle
checkAuthorizationStatus()
checkAuthorizationStatus() => Promise<{ status: string; }>Returns: Promise<{ status: string; }>
requestPermissions()
requestPermissions() => Promise<{ authorized: boolean; }>Returns: Promise<{ authorized: boolean; }>
Interfaces
PluginListenerHandle
| Prop | Type |
| ------------ | ----------------------------------------- |
| remove | () => Promise<void> |
BeaconInfo
| Prop | Type |
| ---------------- | -------------------------------------------------------------------------- |
| uuid | string |
| major | number |
| minor | number |
| proximity | 'Unknown' | 'Immediate' | 'Near' | 'Far' | 'NotRecovered' |
| accuracy | number |
| rssi | number |
| macAddress | string |
