Can't use OSCP5 in landscape Orientation
in
Android Processing
•
2 years ago
Hello,
I developing an app that display a video when an osc message is received.
To display the video in fullscreen I put the orientation on landscape, the video is displayed using apwidgets.
I realized that in landscape orientation, osc message are still received and print in the console,
but any other code in the void oscEvent(OscMessage theOscMessage) is not effective any more...
Any solution ??
Here my code, you have to remove line 10 to make it works :
- import oscP5.*;
- import netP5.*;
- OscP5 oscP5;
- NetAddress myRemoteLocation;
- void setup()
- {
- orientation(LANDSCAPE);
- //OSC
- oscP5 = new OscP5(this,12000);
- myRemoteLocation = new NetAddress("127.0.0.1",12000);
- }
- void draw(){
- }
- void mousePressed() {
- oscP5.send("/MessageToDevice",new Object[] {"GetCold"}, myRemoteLocation);
- }
- void oscEvent(OscMessage theOscMessage) {
- /* print the address pattern and the typetag of the received OscMessage */
- print("### received an osc message.");
- print(" addrpattern: "+theOscMessage.addrPattern());
- println(" typetag: "+theOscMessage.typetag());
- background(random(255));
- }
1