Hello,
I need to execute one OutputStream instruction with little delay, because may receiver is to slow for receiving second data...
Here is the example:
I wrote comment where I need delay for around 100ms...Is this possible? How can I do that?
I need to execute one OutputStream instruction with little delay, because may receiver is to slow for receiving second data...
Here is the example:
Code:
toggleButton2.setOnClickListener(new View.OnClickListener() {
EditText editText1 = (EditText)findViewById(R.id.editText1);
public void onClick(View v) {
if(toggleButton2.isChecked()){
try
{
String t = "xxxx";
mmOutputStream.write(t.getBytes());
int vrednost = Integer.parseInt(editText1.getText().toString());
//delay 100ms
mmOutputStream.write(vrednost);
}catch (IOException ex) { }