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 permissions in your application using the following lines of code:

<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.183.150