public class

MemeLib

java.lang.Object
↳ com.jins_jp.meme.MemeLib

Provides means of running commands, scanning and establishing connection to JINS MEME.
Responses from JINS MEME can be retrieved through each listeners.

NOTE Make sure to use setAppClientID to set up your App ID and App Secret. MemeLib will not work unless you go through the authentication process.

Public Methods

voidsetAppClientID(Context context, String appClientId, String clientSecret)
Authentication and authorization of App and SDK.
MemeLibgetInstance()
Returns a instance of MemeLib.
MemeStatusstartScan(MemeScanListener listener)
Strats scanning JINS MEME. It provides results through MemeScanListener
voidstopScan()
Stops scanning JINS MEME.
MemeStatusconnect(String deviceAddress)
Establishes connection to JINS MEME.
MemeStatussetMemeConnectListener(MemeConnectListener listener)
Sets MemeConnectListener to get connection result.
voidsetAutoConnect(boolean flag)
Configure auto connection to JINS MEME
booleanisConnected()
Returns whether a connection to JINS MEME has been established.
voiddisconnect()
Disconnects from JINS MEME.
MemeStatusstartDataReport(MemeRealtimeListener listener)
Starts receiving realtime data
The data is provided through MemeRealtimeListener.
voidstopDataReport()
Stops receiving data.
StringgetSDKVersion()
Returns SDK version.
ListgetConnectedByOthers()
Returns JINS MEME connected with other apps.
MEMECalibStatusisCalibrated()
Returns calibration status.
intgetConnectedDeviceType()
Returns device type.
intgetConnectedDeviceSubType()
Returns hardware version.
StringgetFWVersion()
Returns FW Version.
intgetHWVersion()
Returns HW Version.
intisDataReceiving()
Returns response about whether data was received or not.

public void setAppClientID (Context context, String clientId, String clientSecret)

Authentication and authorization of App and SDK.

Parameters
contextinstance of android.content.Context
clientIdApp ID issued when App is registered to JINS MEME
clientSecretApp Secret issued when App is registered to JINS MEME

public void getInstance ()

Returns instance of MemeLib

Returns
instance of MemeLib

public MemeStatus startScan (MemeScanListener listener)

Starts scanning JINS MEME.
It provides results through MemeScanListener.
Scanning won’t be stopped untill stopScan().

Parameters
listenerinstance of MemeScanListener
Returns
instance of MemeStatus

public boolean stopScan ()

Stops scanning JINS MEME.


public MemeStatus connect (String deviceAddress)

Establishes connection to JINS MEME.
The results are provided through MemeConnectListener. |

Parameters
deviceAddressdevice mac address
Returns
instance of MemeStatus

public MemeStatus setMemeConnectListener (MemeConnectListener listener)

Sets MemeConnectListener to get connection result.
Parameters
listenerinstance of MemeConnectListener
Returns
instance of MemeStatus

public void setAutoConnect( boolean flag )

Configure auto connection to JINS MEME.
When it is true, MemeLib tries to establish connection with last connected JINS MEME, when it is not connected.

Parameters
flagtrue - enable auto-connect, false - disable auto-connect

public boolean isConnected ()

Returns
whether a connection to JINS MEME has been established.

public void disconnect ()

Disconnect JINS MEME.


public boolean startDataReport (MemeRealtimeListener listener)

Starts receiving realtime data
The data is provided through MemeRealtimeListener.

Parameters
listenerinstance of MemeRealtimeListener
Returns
instance of MemeStatus

public void stopDataReport ()

Stops receiving data.


public String getSDKVersion ()

Returns
SDK version.

public List getConnectedByOthers ()

Returns
JINS MEME connected with other apps.

public MEMECalibStatus isCalibrated ()

Returns
calibration status.

public int getConnectedDeviceType ()

Returns
126
ES (Wellington)MT(sunglasses)SW ES (Wellington)

public int getConnectedDeviceSubType ()

Returns
12
shinny blackmat black

public int getConnectedDevice ()

Returns
hardware version.

public String getFWVersion ()

Returns
FW Version.

public int getHWVersion ()

Returns
HW Version.

public int isDataReceiving ()

Returns
Response about whether data was received or not.