Example in previous section uses bluecove-gpl-2.1.0.jar
which is not
portable because it uses JNI. If you use ARM or RPi and so on,
just compile native codes for your target device.
Hence, if you want to use this sample, follow:
Download the source code of bluecove-gpl.jar
and its dependency
bluecove.jar
.
Download link can be found in this google repo.
Compile native code for your target device.
You can refer to the JNI chapter.
bluecove-gpl
source code.Extract bluecove-gpl
, for me, bluecove-2.1.0-sources.tar.gz
:
tar -zxf bluecove-gpl-2.1.0-sources.tar.gz
make directory for its dependency bluecove.jar
mkdir -p bluecove/target
cd bluecove/target
Put bluecove.jar
in bluecove/target
. For me,
wget https://bluecove.googlecode.com/files/bluecove-2.1.0.jar
Change directory to bluecove-gpl
and modify `build.xml.
For me,
Change from
<property name="product_version" value="2.1.0-SNAPSHOT"/>
to
<property name="product_version" value="2.1.0"/>
ant all
to get everything done.target
directory.Lock inside of the jar file. Its structure is like below:
├── LICENSE.txt
├── META-INF
│ └── MANIFEST.MF
├── com
│ └── intel
│ └── bluetooth
│ ├── BluetoothStackBlueZ$1.class
│ ├── BluetoothStackBlueZ$2.class
│ ├── BluetoothStackBlueZ.class
│ ├── BluetoothStackBlueZConsts.class
│ └── BluetoothStackBlueZNativeTests.class
└── libbluecove_arm.so
Notice that the share library's naming convention.
lib<XXX>_arm.so
Recall what metioned in JNI
chapter.