Difference between revisions of "Developer guide V2"

From Neurotech Software Development Kit
Jump to: navigation, search
(Download SDK)
(Android Studio)
Line 16: Line 16:
  
 
'''''Permissions'''''
 
'''''Permissions'''''
 +
<code>
 +
    <uses-permission android:name="android.permission.BLUETOOTH"/>
 +
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
 +
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
 +
    <uses-permission android:name="android.permission.INTERNET"/>
 +
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
 +
</code>
  
 
===== XCode =====
 
===== XCode =====

Revision as of 08:31, 15 April 2018

Getting Started

This page describes what you need to know to get started programming for Callibri using the Neurotech Software Development Kit (SDK).

<note tip> If you prefer to dive directly into source code, take a look at the examples. </note>

Supported Devices

You need a device that supports Bluetooth Low Energy and has Android 4.3 or newer.

Adding the SDK to a Project

Android Studio

The Neurotech SDK requires Android API Level 18 or higher. So, applications using the SDK need to set their minSdkVersion to 18 or higher.

Permissions

   <uses-permission android:name="android.permission.BLUETOOTH"/>
   <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
   <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
   <uses-permission android:name="android.permission.INTERNET"/>
   <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

XCode

Include static library Here described neurosdk library linking for XCode Swift project.

Dowload latest library version here

On your project settings page go to the Build Settings tab.

Xcode-build-settings-tab.png


In Search Paths section find Library Search Paths property and set it with path to neurosdk library directory (directory where you downloaded libray to).

Xcode-library-search-path.png


Then go to Swift Compiler General section and set path to neurosdk.h file in Objective-C Briging header. This header contains all interfaces of neurosdk library and should be in include subdirectory of neurosdk library download path.

Xcode-bridging-header-path.png


Go to the Build Phases tab and find Link Binary With Libraries section.

Xcode-build-phases-tab.png


Click plus button to add needed libs. You need to add Bluetooth framework (CoreBluetooth.framework) and C++ standard library (libstdc++.tbd), use search to get them. Then add sdk library (libneurosdk.a).

Xcode-link-bin-with-libs.png


Click Add Other to find it in download directory.

Xcode-add-other.png


After that you can use SDK in your project.

Build from sources You can also build neurosdk library from sources in cloned or forked repo.

To do this open project neurosdk with XCode from ios/libneurosdk directory. Select libneurosdk aggregate target and run project build.

Xcode-libneurosdk-target.png


Output files will be in ios/libneurosdk/out directory.

Using the SDK

Running the Samples

Android Studio
XCode

Classes list

Examples