gg-bluetooth-ionic-plugin
Capacitor plugin for Bluetooth devices
Install
npm install gg-bluetooth-ionic-plugin
npx cap sync
API
clearDevices()
clearDevices() => Promise<{ value: boolean; }>
Returns: Promise<{ value: boolean; }>
syncDevices(...)
syncDevices(data: { devices: GGBTDevice[]; }) => Promise<{ value: boolean; }>
Param | Type |
---|
data | { devices: GGBTDevice[]; } |
Returns: Promise<{ value: boolean; }>
scan(...)
scan(data: { profile: GGBTUserProfile; }, callback: GGBTScanCallback) => Promise<{ value: { type: string; data: any; }; }>
Param | Type |
---|
data | { profile: GGBTUserProfile; } |
callback | GGBTScanCallback |
Returns: Promise<{ value: { type: string; data: any; }; }>
stop(...)
stop(data: { forceStop: boolean; }) => Promise<{ value: boolean; }>
Param | Type |
---|
data | { forceStop: boolean; } |
Returns: Promise<{ value: boolean; }>
updateProfile(...)
updateProfile(data: { profile: GGBTUserProfile; }) => Promise<{ value: boolean; }>
Param | Type |
---|
data | { profile: GGBTUserProfile; } |
Returns: Promise<{ value: boolean; }>
confirmPair(...)
confirmPair(data: { device: GGBTDevice; }) => Promise<{ value: any; }>
Param | Type |
---|
data | { device: GGBTDevice; } |
Returns: Promise<{ value: any; }>
deleteUser(...)
deleteUser(data: { device: GGBTDevice; disconnect: boolean; }) => Promise<{ value: any; }>
Param | Type |
---|
data | { device: GGBTDevice; disconnect: boolean; } |
Returns: Promise<{ value: any; }>
getWifiList(...)
getWifiList(data: { device: GGBTDevice; }) => Promise<{ value: { wifi: any[]; }; }>
Param | Type |
---|
data | { device: GGBTDevice; } |
Returns: Promise<{ value: { wifi: any[]; }; }>
setupWifi(...)
setupWifi(data: { device: GGBTDevice; wifiConfig: GGBTWifiConfig; }) => Promise<{ value: any; }>
Param | Type |
---|
data | { device: GGBTDevice; wifiConfig: GGBTWifiConfig; } |
Returns: Promise<{ value: any; }>
updateSetting(...)
updateSetting(data: { device: GGBTDevice; settings: GGBTSetting[]; }) => Promise<{ value: any; }>
Param | Type |
---|
data | { device: GGBTDevice; settings: GGBTSetting[]; } |
Returns: Promise<{ value: any; }>
disconnectDevice(...)
disconnectDevice(data: { device: string; }) => Promise<{ value: any; }>
Param | Type |
---|
data | { device: string; } |
Returns: Promise<{ value: any; }>
skipDevice(...)
skipDevice(data: { device: string; }) => Promise<{ value: any; }>
Param | Type |
---|
data | { device: string; } |
Returns: Promise<{ value: any; }>
getUsers(...)
getUsers(data: { device: GGBTDevice; }) => Promise<{ value: any; }>
Param | Type |
---|
data | { device: GGBTDevice; } |
Returns: Promise<{ value: any; }>
getWifiMacAddress(...)
getWifiMacAddress(data: { device: GGBTDevice; }) => Promise<{ value: any; }>
Param | Type |
---|
data | { device: GGBTDevice; } |
Returns: Promise<{ value: any; }>
startFirmwareUpdate(...)
startFirmwareUpdate(data: { device: GGBTDevice; timestamp?: number; }) => Promise<{ value: any; }>
Param | Type |
---|
data | { device: GGBTDevice; timestamp?: number; } |
Returns: Promise<{ value: any; }>
getDeviceInfo(...)
getDeviceInfo(data: { device: GGBTDevice; }) => Promise<{ value: any; }>
Param | Type |
---|
data | { device: GGBTDevice; } |
Returns: Promise<{ value: any; }>
cancelWifi(...)
cancelWifi(data: { device: GGBTDevice; }) => Promise<{ value: boolean; }>
Param | Type |
---|
data | { device: GGBTDevice; } |
Returns: Promise<{ value: boolean; }>
updateAccount(...)
updateAccount(data: { device: GGBTDevice; }) => Promise<{ value: any; }>
Param | Type |
---|
data | { device: GGBTDevice; } |
Returns: Promise<{ value: any; }>
getConnectedWifiSSID(...)
getConnectedWifiSSID(data: { device: GGBTDevice; }) => Promise<{ value: any; }>
Param | Type |
---|
data | { device: GGBTDevice; } |
Returns: Promise<{ value: any; }>
getMeasurementLiveData(...)
getMeasurementLiveData(data: { device: GGBTDevice; }) => Promise<{ value: any; }>
Param | Type |
---|
data | { device: GGBTDevice; } |
Returns: Promise<{ value: any; }>
getDeviceLogs(...)
getDeviceLogs(data: { device: GGBTDevice; }) => Promise<{ value: any; }>
Param | Type |
---|
data | { device: GGBTDevice; } |
Returns: Promise<{ value: any; }>
clearData(...)
clearData(data: { device: GGBTDevice; dataType: ClearDataType; }) => Promise<{ value: any; }>
Param | Type |
---|
data | { device: GGBTDevice; dataType: ClearDataType; } |
Returns: Promise<{ value: any; }>
Interfaces
GGBTDevice
Prop | Type |
---|
name | string |
macAddress | string |
broadcastId | string |
token | string |
userNumber | number |
preference | GGDevicePreference |
GGDevicePreference
Prop | Type |
---|
tzOffset | number |
timeFormat | string |
displayMetrics | string[] |
displayName | string |
shouldMeasurePulse | boolean |
shouldMeasureImpedance | boolean |
shouldFactoryReset | boolean |
wifiFotaScheduleTime | number |
GGBTUserProfile
Prop | Type |
---|
name | string |
scaleDisplayName | string |
age | number |
sex | string |
unit | string |
height | number |
weight | number |
goalWeight | number |
isAthlete | boolean |
goalType | string |
metrics | GGBTMetricConfig[] |
GGBTMetricConfig
Prop | Type |
---|
metric | string |
enabled | boolean |
GGBTWifiConfig
Prop | Type |
---|
ssid | string |
password | string |
GGBTSetting
Prop | Type |
---|
key | string |
value | any |
Type Aliases
GGBTScanCallback
(value: any, err?: any): void
Enums
ClearDataType
Members | Value |
---|
ALL | "ALL" |
ACCOUNT | "ACCOUNT" |
HISTORY | "HISTORY" |
WIFI | "WIFI" |
SETTINGS | "SETTINGS" |