The two permissions:
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
Are accessed in Processing via the Android > Sketch Permissions menu. As long as they are checked there they should not be removed from the manifest:
If I am understanding the oscP5 documentation then if you use the same port in a sketches listening and sending then it is effectively just listening to itself. There are examples on the oscP5 site that demonstrate that (the demos are a little odd - not sure why anyone would need to send and receive in one sketch). I gave each of the sketches different ‘patterns’ so an easy way to eliminate the possibility of a sketch listening to itself is to add this if to the oscEvent:
// incoming osc message are forwarded to the oscEvent method.
void oscEvent(OscMessage theOscMessage)
{
/* check if theOscMessage has the address pattern we are looking for. */
if (theOscMessage.checkAddrPattern("/two") == true)
{
colour = theOscMessage.get(0).intValue();
}
}
I tried what you suggested and it did work but with this if stopped working (suggests it was listening to itself). Also, very annoyingly, don’t pay too much attention to the computer sketches (the Java mode sketch) console as it sees to output prints from both running sketches, computer and Android.
In the meantime I have also tried multicast (https://sojamo.de/libraries/oscp5/examples/oscP5multicast/oscP5multicast.pde), which also didn’t work, so convinced this is a ip address or firewall issue.
