Go Back   Android Forums > Android Development > Application Development > App Inventor
Gamers - Check out our new sister sites!
Nintendo Wii U!    |    OUYA - $99 Android System!

test: Reply
 
LinkBack Thread Tools
Old October 19th, 2012, 12:22 PM   #1 (permalink)
New Member
Thread Author (OP)
 
Join Date: Jul 2012
Posts: 12
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default Delayed instruction?

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:

Code:
toggleButton2.setOnClickListener(new View.OnClickListener() {
                EditText editText1 = (EditText)findViewById(R.id.editText1);
                public void onClick(View v) {                
                    if(toggleButton2.isChecked()){
                        try 
                        {
                           String t = "2";
                            mmOutputStream.write(t.getBytes());
                            int vrednost = Integer.parseInt(editText1.getText().toString());
                    
                         //here I need delay for example, 100ms!!
                            mmOutputStream.write(vrednost);
                        }
I wrote comment where I need delay for around 100ms...Is this possible? How can I do that?

Anza87 is offline  
Reply With Quote
Sponsors
Reply


Go Back   Android Forums > Android Development > Application Development > App Inventor
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 06:21 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.