android - Java Threading Error IllegalThreadState thread already started -
whenever start thread check. did not find anywhere called start on thread without doing check below
if (!mythread.isalive()) mythread.start(); nevertheless, end illegalthreadstateexception : thread started. crashes app (android). there other check need before starting thread?
you should check if thread has started using getstate() , start if state new, otherwise create new thread (if needed).
Comments
Post a Comment