Query about Handlers and Runnable

General topics about the Android-Platform itself.
Coding issues please to the subforum right below.

Query about Handlers and Runnable

Postby gobi_est » Sat Nov 26, 2011 3:30 am

Hi All,
I'm newbie to android.and i have some doubts about Handlers and runnable.

1)
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  mHandler.postDelayed(mUpdateTimeTask, 5000);
Parsed in 0.031 seconds, using GeSHi 1.0.8.4

where mUpdateTimeTask is the object of runnable.

a)when the above call add the message in to the message queue.imm or after 5 sec.
b)How they are achieving 5 sec delay, Is there any thread running background ?

2)
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.         private Runnable mUpdateTimeTask = new Runnable() {
  2.                    public void run() {
  3.                                 }
  4.                         }
  5.  
Parsed in 0.031 seconds, using GeSHi 1.0.8.4

a) will the above code create a thread, If yes , what would be the thread name and priority? If No, is it act as a Callback in this context?


Regards,
Gobi.S
gobi_est
Freshman
Freshman
 
Posts: 8
Joined: Sat Nov 26, 2011 3:04 am

Top

Return to General

Who is online

Users browsing this forum: No registered users and 4 guests