0

Problem: I have to connect a Lego NXT robot to an Android device via bluetooth. The NXT is running leJos, so I can use normal Java code on it. Those devices will send and receive messages from each other. Now, the Android part is clear to me, i did similar things in the past using the Message and Handler classes of Android API.

Is there a similar API in standard Java and how to use it? I found this related thread, but couldn't figure out how it should work. Then I found the Java Message Service API (JMS) from Java EE. Could this be useful? I am just not sure if Java EE stuff will run on that NXT brick...

Community
  • 1
  • 1
Sven Menschner
  • 603
  • 5
  • 12

1 Answers1

0

What if you find Handler.java and Looper.java and Message.java and whatever else is needed in the Android sources and adapt it for your needs? Not sure about licensing policy though.

Alexander Kulyakhtin
  • 47,782
  • 38
  • 107
  • 158
  • Licensing won't be a problem, but I'm not sure how much those classes rely on the Android system... will try to find the sources. Any opinion on JMS? thx – Sven Menschner Jul 17 '12 at 20:23
  • @Sven Menschner I really don't know, I thought JMS is something entirely different – Alexander Kulyakhtin Jul 17 '12 at 21:08
  • you were right, JMS is something completely different. I found out that leJos is based on Java ME, and a lot of components used by those Android classes are not supported... I really don't know how to achieve it now. – Sven Menschner Jul 20 '12 at 13:02