Jins Meme
Implementation of the JINS MEME SDK
Repo: https://github.com/BlyncSync/cordova-plugin-jins-meme
Installation
- Install the Cordova and Ionic Native plugins:
$ ionic cordova plugin add cordova-plugin-jins-meme $ npm install --save @ionic-native/jins-meme@4
- Add this plugin to your app's module
Supported platforms
- Android
- iOS
Usage
import { JinsMeme } from '@ionic-native/jins-meme';
constructor(private jinsMeme: JinsMeme) { }
...
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'));
Instance Members
setAppClientID(setAppClientID, clientSecret)
Authentication and authorization of App and SDK. Must call this method first. Sign up for an app ID (and get an app/client secret) at developers.jins.com
Param | Type | Details |
---|---|---|
setAppClientID |
string
|
|
clientSecret |
string
|
Returns: Promise<any>
startScan()
Starts scanning for JINS MEME.
Returns: Observable<any>
stopScan()
Stops scanning JINS MEME.
Returns: Promise<any>
connect(target)
Establishes connection to JINS MEME.
Param | Type | Details |
---|---|---|
target |
string
|
Returns: Observable<any>
setAutoConnect(flag)
Set auto connection mode.
Param | Type | Details |
---|---|---|
flag |
Boolean
|
Returns: Promise<any>
isConnected()
Returns whether a connection to JINS MEME has been established.
Returns: Promise<any>
disconnect()
Disconnects from JINS MEME.
Returns: Promise<any>
startDataReport()
Starts receiving realtime data.
Returns: Observable<any>
stopDataReport()
Stops receiving data.
Returns: Promise<any>
getSDKVersion()
Returns SDK version.
Returns: Promise<any>
getConnectedByOthers()
Returns JINS MEME connected with other apps.
Returns: Promise<any>
isCalibrated()
Returns calibration status
Returns: Promise<any>
getConnectedDeviceType()
Returns device type.
Returns: Promise<any>
getConnectedDeviceSubType()
Returns hardware version.
Returns: Promise<any>
getFWVersion()
Returns FW Version.
Returns: Promise<any>
getHWVersion()
Returns HW Version.
Returns: Promise<any>
isDataReceiving()
Returns response about whether data was received or not.
Returns: Promise<any>