jfjlaros / simpleRPC

Simple RPC implementation for Arduino.
MIT License
50 stars 17 forks source link

Java client for Android #26

Closed aleksas closed 2 years ago

aleksas commented 2 years ago

Is there by any chance Java implementation of the client similar to python? The goal is to communicate with Android smartphone.

jfjlaros commented 2 years ago

The Python implementation is meant as a reference implementation, I was actually hoping that other enthusiasts would pick this up for other programming languages. I am not a good Java programmer myself, nor do I have access to an Android OS, so I guess that I am not the best person to ask.

After a bit of searching, I did find that Python is supported on Android. Would that not be a way to go?

aleksas commented 2 years ago

I've started checking python on Android but it seams a bit backwards. Another alternative might be using cpp client and replacing BT read/write calls with android bt calls via Android NDK.

I haven't coded for Android in a while now so we'll see how it goes.

By the way, great library. Using it to test/communicate with esp32 based custom board. Thanks!

jfjlaros commented 2 years ago

The C++ client is really only a proof of concept for an other project it is not usable as a stand alone library as is.

Perhaps it could be used as a starting point for your project. Please let me know if you have questions.

aleksas commented 2 years ago

Started java-simple-rpc project at this moment it's only ported Protocol class and tests from python client.

jfjlaros commented 2 years ago

That is looking very promising. Nice work.

aleksas commented 2 years ago

@jfjlaros arduino-simple-rpc for Java is mostly done. Code and tests have been mirrored from arduino-simple-rpc Python package. Bluetooth and Serial comms tested.Package is accessible via Maven central repo. I'll add README and extra tests for more native types eventually and wifi support, but for now I'll jump to using it in Android project. Would you consider taking over the project?

jfjlaros commented 2 years ago

That looks pretty good. Congratulations. I will add references to your implementation in the documentation.

Would you consider taking over the project?

Since I have virtually zero experience with Java projects, I would make a rather poor maintainer for this project. What I can do though, is suggest changes. Probably even in the form of pull requests. Would that be an acceptable compromise?

aleksasp commented 2 years ago

Yes that should work.

aleksas commented 1 year ago

@jfjlaros Crude Android project repo is ready to some extent. It uses JAVA simpleRPC. This is more a proof of concept. UI calls only functions without params - other disabled. Full implementation would require dynamic UI generation according to exposed method param list. Due to limited experience with android and lack of free time lately code quality is far from perfect.

jfjlaros commented 1 year ago

I do not have any way to test it myself, but the animated GIF looks very nice.

In the next release of the library I will mention your projects.