From 79f0a3fc7b34aeba6ad319b3990ff9027732652b Mon Sep 17 00:00:00 2001 From: Ibrahim Hadeed Date: Sun, 25 Sep 2016 18:36:00 -0400 Subject: [PATCH] feat(ble): add startScanWithOptions closes #539 --- src/plugins/ble.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/plugins/ble.ts b/src/plugins/ble.ts index 6df9f2f6..a653841a 100644 --- a/src/plugins/ble.ts +++ b/src/plugins/ble.ts @@ -207,6 +207,18 @@ export class BLE { }) static startScan(services: string[]): Observable { return; } + /** + * Scans for BLE devices. This function operates similarly to the `startScan` function, but allows you to specify extra options (like allowing duplicate device reports). + * @param {string[]} services List of service UUIDs to discover, or `[]` to find all devices + * @param options {any} + */ + @Cordova({ + observable: true, + clearFunction: 'stopScan', + clearWithArgs: true + }) + static startScanWithOptions(services: string[], options: {reportDuplicates?: boolean} | any): Observable { return; } + /** * Stop a scan started by `startScan`. *