Android Multithreading, creating new thread not executing rest of OnCreate

Posted by Aidan on Stack Overflow See other posts from Stack Overflow or by Aidan
Published on 2010-06-09T10:56:12Z Indexed on 2010/06/09 11:02 UTC
Read the original article Hit count: 250

Filed under:
|
|

Hi Guys,

Basically I'm trying to run 2 threads within the same class at the same time. The code runs but only executes whats in run() and doesnt finish the onCreate method... anyone know why?

public Camera1(){
    t = new Thread(this, "My Thread"); 
    t.start();
}
public void run(){
    bearing();
}
@Override 
public void onCreate(Bundle savedInstanceState) { 
    super.onCreate(savedInstanceState); 
    new Camera1();
    makeview();
    tracking();

} 

Thanks!

© Stack Overflow or respective owner

Related posts about java

Related posts about android