From 543ae7abf8a7c3e22267100a541f8eed544418a7 Mon Sep 17 00:00:00 2001 From: Josh Babb Date: Wed, 29 Mar 2017 17:56:35 -0500 Subject: [PATCH] docs(jins-meme): add extended usage example (#1286) --- src/@ionic-native/plugins/jins-meme/index.ts | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/@ionic-native/plugins/jins-meme/index.ts b/src/@ionic-native/plugins/jins-meme/index.ts index d8373cd44..6d13d29f5 100644 --- a/src/@ionic-native/plugins/jins-meme/index.ts +++ b/src/@ionic-native/plugins/jins-meme/index.ts @@ -17,9 +17,16 @@ declare var cordova: any; * * ... * - * this.jinsMeme.setAppClientID(appClientId: string, clientSecret: string) - * .then(this.jinsMeme.startScan()) - * .catch(console.log('jinsMeme.setAppClientID authentication error!')); + * this.jinsMeme.setAppClientID(appClientId: string, clientSecret: string).then( + * // Bluetooth should be enabled and the JINS MEME powered on (blinking blue light) + * this.jinsMeme.startScan().subscribe((meme_addr) => { + * this.jinsMeme.connect(meme_addr).subscribe((connectResult) => { + * this.memeService.startDataReport().subscribe((dataReport) => { + * console.log(dataReport); + * }); + * }); + * }); + * .catch(console.log('jinsMeme.setAppClientID authentication error')); * * ``` */ @@ -34,7 +41,8 @@ declare var cordova: any; export class JinsMeme { /** * Authentication and authorization of App and SDK. - * Must call this method at first. + * Must call this method first. + * Sign up for an app ID (and get an app/client secret) at developers.jins.com * *@param {string} setAppClientID *@param {string} clientSecret