Is the XBee Java Library compatible with Android devices?

I have an XBee ZigBee device connected to an Android phone via a BLE gateway (the XBee and BLE gateway are connected with UART). The BLE gateway acts transparently: any XBee message received is transmitted over the gateway to the Android phone and any BLE message received on the gateway is transmitted to the XBee. To facilitate communication with my XBee device, I would like to use the XBee Java Library within an app on the Android phone. Can this be done? In particular:

1.) Will the library compile on an Android phone?
2.) Can the serial communication interface within the library be replaced by a BLE communication interface? If so, what is the right way to do so?

Thanks in advance for the help!

3 Likes

You have an example using the XBee Java Library in Android here:

https://github.com/digi-embedded/android-sample-xbeemanager

Is an example that we use in one of our embedded devices. The jar with the library is included in the example.

Regards

I have gottenn the source of that github repository, but there is a missed class:

com.digi.android.serial.SerialPortManager;

That class is used in fillSerialPorts() method of XbeeConnectActivity.

Where can we get it?

Thanks.

Iā€™m getting the same issue