Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XBeeJavaLibrary In Android #31

Closed
jetremote opened this issue Feb 11, 2015 · 13 comments
Closed

XBeeJavaLibrary In Android #31

jetremote opened this issue Feb 11, 2015 · 13 comments

Comments

@jetremote
Copy link

Hello!,

Works XBee (and XBeeJavaLibrary) with OTG Android Devices?

Regards

@daescalona
Copy link
Member

Hello,

We are working onthe Android support. It is still experimental and is not documented, but you can have a look at this branch:

https://github.com/digidotcom/XBeeJavaLibrary/tree/android_support

@jetremote
Copy link
Author

Thank you,

I used Idea (Android Studio), with Gradle http://android-hispano.blogspot.com.es/ (also Eclipse but not for Android). I'll try, I think it works well.

But my Galaxy S4 not works with XBee, I think I have to buy a smartphone or tablet that supports OTG, is it not? Do you use a device with OTG?

Regards,

@jetremote
Copy link
Author

On second thought I will not use a smartphone or tablet because the battery runs out very quickly.

@t3db0t
Copy link

t3db0t commented Oct 26, 2015

What's the status of the Android Support branch? I need to implement this ASAP; but this branch is 92 commits behind master. Is it useable in any way? Really the only thing I need to do is use a vendor's proprietary serial port class/methods, can IConnectionInterface be used for this?

@daescalona
Copy link
Member

Hello,

I just merged master on the Android branch. Build is ok and all tests are passing so it is safe to use.

Kind regards.

@t3db0t
Copy link

t3db0t commented Oct 26, 2015

Wow, awesome! Thank you!

@t3db0t
Copy link

t3db0t commented Oct 26, 2015

Followup question—is there an example of how to use a separate serial port with the library? Thank you!

@daescalona
Copy link
Member

Hello,

What do you mean with separate serial port? If what you want is to integrate another serial library, no, there is not any example. Best way is to check how it is done with the current one in code. Also, I think there is a pull request with another serial library implementation you could check.

Kind regards.

@t3db0t
Copy link

t3db0t commented Nov 11, 2015

Hi again—I'm fairly new to Android so I'm still trying to figure out the correct way to do this. I have a proprietary android tablet with a built-in serial port. They have their own proprietary serial API (i.e. GemvaryPortSdk.Start("ttyS0",115200)). I will have to somehow use that serial port with this library. Is that possible? Secondly, I assume the builds available on the Releases page would not be useable since they reflect the master branch? Thank you for your time :)

@daescalona
Copy link
Member

Hello,

In order to achieve it you will need to create a class implementing the IConnectionInterface implementing all the required methods using your Serial Port class. Then you will have o instantiate your XBee Device using your newly created Connection class.

Another option is to use the USB connection directly for which we already have support in the Android branch (it uses the Android USB Host interface). With this option you will not need to implement anything new, it works out of the box.

Hope that helps.

Kind regards.

@bveina
Copy link

bveina commented Oct 31, 2016

is there any plan to pull the android branch into the main branch?

@rubenmoral
Copy link
Member

Hi @bveina,

Yes, our plan is to merge and release that functionality very soon.

Best regards.

@rubenmoral
Copy link
Member

rubenmoral commented Jan 13, 2017

Hi everyone,

We've just released a new version of the library, 1.2.0, which includes full support for Android.

https://github.com/digidotcom/XBeeJavaLibrary/releases/tag/v1.2.0

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants