Skip to content

Instantly share code, notes, and snippets.

@oflarcade
Created October 30, 2019 09:19
Show Gist options
  • Save oflarcade/0ab753cf724ecaf8a9993be986c5a0ca to your computer and use it in GitHub Desktop.
Save oflarcade/0ab753cf724ecaf8a9993be986c5a0ca to your computer and use it in GitHub Desktop.
constructor() {
super();
this.state = {
scanning: false,
peripherals: new Map(),
peripheral:null,
appState: '',
connectedTo: 'nothing',
battery: null,
fVersion: null,
Snumber: null,
time: null,
steps: null,
distance: null,
calory: null,
rssi: null,
heartbeat: null,
};
this.handleDiscoverPeripheral = this.handleDiscoverPeripheral.bind(this);
this.handleStopScan = this.handleStopScan.bind(this);
this.handleUpdateValueForCharacteristic = this.handleUpdateValueForCharacteristic.bind(
this,
);
this.handleDisconnectedPeripheral = this.handleDisconnectedPeripheral.bind(
this,
);
this.handleAppStateChange = this.handleAppStateChange.bind(this);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment