androidAndroid | Making your own application

By downloading this developer SDK you are agreeing to our non-commercial developer license agreement, if you'd like a commercial license please contact us at business@choosemuse.com

Once you have explored the example and are ready to start developing your own application, follow these steps to set up your own project.

  1. Create a new project in Android Studio

    When asked for the Target Android Devices, ensure that the minimum SDK is set to “API 19: Android 4.4 (KitKat)” or higher on the platforms you select. API 19 is necessary for the Bluetooth Low Energy connection used by the Muse 2016 headband.

  2. Copy the libmuse-android directory to the libs folder of your application

    Locate the libs folder in the LibMuse installation folder. Copy the libmuse-android.jar file to the app/libs folder of your new project.

  3. Create a folder called “jniLibs” in your project under app/main/src

  4. Copy the armeabi-v7a directory from the libs folder to the new jniLibs folder

    Locate the libs folder in the LibMuse installation folder. Copy the armeabi-v7a folder to the app/src/main/jniLibs folder of your new project.

  5. Add the libmuse-android.jar file to the app’s gradle file.

    Open the build.gradle file for the app. Add the line “compile files(‘libs/libmuse-android.jar’)” to the dependencies section of the file.

  6. In your source code, set the context on the MuseManagerAndroid instance before accessing any of the other LibMuse methods.

    A Context object is required for MuseManagerAndroid to detect Muse headbands. Before calling the other methods in the LibMuse library, you should set the context on the MuseManagerAndroid instance. This only needs to be done once.