Cortex Library for Mobile
  • Getting Started
  • Objective-C API for iOS
    • CortexLib class
    • CortexClient class
    • CortexClientDelegate protocol
  • Java API for Android
    • EmotivLibraryLoader class
    • CortexLib class
    • CortexClient class
  • Additional JSON methods
    • loginWithAuthenticationCode
    • logout
    • queryVirtualHeadsets
    • createVirtualHeadset
    • deleteVirtualHeadset
    • updateVirtualHeadset
    • triggerVirtualHeadsetEvent
    • Virtual headset object
    • freeUpRecords
  • Release Notes
Powered by GitBook
On this page

Java API for Android

PreviousCortexClientDelegate protocolNextEmotivLibraryLoader class

Last updated 4 years ago

On Android, the Cortex library provides an API written in Java. It contains three classes:

  • to load the Cortex library

  • to initialize the Cortex library

  • to send and receive JSON messages to the Cortex library

Workflow

On Android, the basic workflow of the API is as follow:

  1. Create an object from the class and call its load method

  2. Call the static method start of the class

  3. Create an object from the class

  4. Call the method registerResponseHandler of the object

  5. Call the method sendRequest of the object to send JSON messages to the Cortex library. You can call this methods as many times as necessary. Cortex will respond asynchronously, using the handler you provided at step 4. Please check the to know the format of the JSON messages.

  6. Call the static method stop of the class

EmotivLibraryLoader
CortexLib
CortexClient
EmotivLibraryLoader
CortexLib
CortexClient
CortexClient
CortexClient
Cortex API documentation
CortexLib