I have a handwriting recognition app - the user draws with their finger, the app recognizes characters. The recognition engine runs in a worker thread that has the the minim
Try to add Thread.sleep(1) in main cycle in character recognition method
@Override
public void run() {
while (!recognited) {
//do some script
try {
Thread.sleep(1);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
this sleep lets virtual machine to resume other thread a bit early and often