Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - Starting thread along with app.

Starting thread along with app.

Put your problem here if it does not fit any of the other categories.

Starting thread along with app.

Postby rajuk » Tue Apr 01, 2008 6:00 pm

Hi,

I need to start thread when app is started and keep on running untill the App is closed.

Does anyone can help to do this?

Thanks in advance,
rajuk
rajuk
Freshman
Freshman
 
Posts: 8
Joined: Tue Feb 26, 2008 3:52 am

Top

Postby snailfur » Tue Apr 01, 2008 7:33 pm

Code: Select all
public class myActivity extends Activity
{   
    protected void onCreate(Bundle icicle)
    {
        super.onCreate(icicle);
        Thread mySexyThread = new Thread(new myThreadClass);
        mySexyThread.start();
     }
         class myThreadClass implements Runnable
        {
                public void run()
                {
                        while(!Thread.currentThread().isInterrupted())
                        {
                                // Do magic here...
                        }
                }
         }
}
snailfur
Freshman
Freshman
 
Posts: 6
Joined: Sat Mar 08, 2008 5:22 pm

Postby Rader » Wed Apr 02, 2008 4:04 am

I just solved a problem with threads.
Take a look at this post:
http://www.anddev.org/asynchronously_lo ... t1563.html

Hope it's helpful!
Best regards,

Rader
Rader
Freshman
Freshman
 
Posts: 6
Joined: Thu Mar 06, 2008 8:10 am
Location: China

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 13 guests