Hi,
I am using this method to identify if a thread is running at any point
of time, irrespective of whether the enclosing activity is running or
not.
Is this the right way?
Please reply.
Java:
Thread t = new Thread(new Runnable(){
public void run()
{
Looper.prepare();
//DO SOME WORK
Looper.loop();
}
});
isRunning = true;
t.start();
this.finish();
}
public void onStop()
{
super.onStop();
isRunning=false;
}
public boolean CheckRunningSync()
{
boolean returner = true;
if(isRunning == false)
returner = false;
if(isRunning == true)
returner = true;
return returner;
}
isRunning is a boolean local variable.
Thanks,
Immanuel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---