Getting started with the CSRMesh Android library

The CSRMesh library is not yet available on Gradle, so you cannot add it directly to the build.gradle file in your Android project. You need to add the CSRmeshLibrary.aar file in your project. You also need to add Spongy Castle libraries used for mesh security. These files can be found under CSRMeshAndroidApplicationCSRmeshDemoCSRmeshLibrary, provided with this chapter. 

After attaching the library, go to the AndroidManifest.xml class to add a MeshService. This can be achieved by writing this in your Manifest.xml file under the <application> tag:

<service    android:name="com.csr.mesh.MeshService"    android:enabled="true"    android:exported="false" ></service>

Also, provide the BLUETOOTH and BLUETOOTH_ADMIN ...

Get Building Bluetooth Low Energy Systems now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.