0
因此,我试图将seekBar的progressValue发送到使用OSC的服务器。但是,我没有收到服务器端的任何信息。尝试使用OSC/UDP发送seekBar到服务器的progressValue使用OSC/UDP
连接有效,因为我拥有所有注册的单选按钮以及同样有效的玩家注册。任何人都可以检查此代码段并提供一些建议?
public void onProgressChanged(SeekBar seekbar, int progressValue, boolean fromUser) {
int step = 10;
// text = (TextView) findViewById(R.id.text);
if(seekbar == Size) {
progressValue = ((int) Math.round(progressValue/step)) * step;
sz = progressValue;
Size.setProgress(progressValue);
text.setText(String.valueOf(progressValue));
try{
//This is where the value is being sent to the server
sender.send(new OSCMessage("/update_size", sz));
}catch(Exception E){
text.setText("Catch 3: "
+ E.getClass().getName() + ", "
+ E.getMessage());
}
}
什么样的数据类型是sz?它与服务器上的注册回调是否相同?如果服务器与预期的不匹配,它可能会在服务器上被放弃。 – razong