I am using Processing 3.5.2 on windows 7. Making an application for android which deals with serial communication. (wired and not Bluetooth).
Now, If I use the program in java mode with corresponding default serial library, it works just fine. But problem occurred when I shifted to android mode. I used the library from this site: https://github.com/inventit/processing-android-serial
Even after following the instructions very carefully. It failed.
Now, the issue was that the connection between android and the computer (for launching the application on the device) and the connection between android and the micro controller (for data transfer) uses a common port i.e. the mini-usb port. So, the program was written in such a way that the serial connection will only be done after a click on the screen.
With this Processing tells me “built successful” and it launches the application on the device when i click ‘run on device’.
After this when I close the app and reopen it , connect the micro controller connection and click the button to connect serial, it gives me this error:
java.lang.IllegalArgumentException: This library works only on Android.
Even after I do things as mentioned on that aforementioned site, it doesn’t work.
Any suggestions? I am suspecting the library because everything works fine in java mode.