Problem with running a simple sketch on Android

Hello,

Last step done, it works!
I have now a processing sketch on my phone that communicates with a processing sketch on my PC!

Thank to the netstat command svan lead me to and ipconfig, I finally figured out what was wrong. I just had to plug and unplug different network connections to find what was the good ip adress to use in the client sketch…

To summarize what I did:

-For the problem with running an app on a smartphone using processing, the problem was solved with using Android Studio and following this tutorial.

-For the problem with using the client class of the library processing.net with processing on Android Studio, the solution was to:

  • create a new java class named “Client” (next to the processing sketch and MainActivity, in the same folder. I easily did it from AS).
  • Copy/paste modified client code from this discussion in this new java class
  • Add the line (replace “][” by ><) [uses-permission android:name=“android.permission.INTERNET”] in the AndroidManifest.xml file

Then be careful with the ip adress set in the client sketch. Using ipconfig and netstat from a cmd terminal can help a lot!

2 Likes