first:
10-26 17:43:07.454: WARN/dalvikvm(6371): threadid=3: unable to interrupt threadid=19
10-26 17:43:07.487: DEBUG/dalvikvm(6371): GC freed 279 objects / 259776 bytes in 208ms
10-26 17:43:07.487: WARN/WindowManager(2215): Attempted to add application window with unknown token HistoryRecord{46366130 spexco.hus.cepvizyon/.ViewCam}. Aborting.
I cant see other errors now, But in second, I want to learn how to stop Handler.? My handler code is: I call with "handler.sendMessage(new Message());"
private Handler handler = new Handler() {
public void handleMessage(Message msg) {
try {
bmp = CameraManagerScreen.ActiveCam.getCurrentImage();
bmpl = CameraManagerScreen.ActiveCam.getCurrentLenght();
if (bmpl != bmpltmp) {
if (speed.getVisibility() == 4) {
speed.setVisibility(0);
counter++;
} else {
speed.setVisibility(4);
counter++;
}
}
bmpltmp = bmpl;
if (bmp != null) {
if (CameraManagerScreen.ActiveCam.isConnected())
m_ProgressDialog.dismiss();
imageView.setImageBitmap(bmp);
}
if (isDemo && counter == 10) {
counter++;
CameraManagerScreen.ActiveCam.cancel();
CameraManagerScreen.ActiveCam.setConnected(false);
m2_ProgressDialog.show();
}
} catch (Exception e) {
} finally {
if (isDemo && counter == 10)
sleep(999999999);
sleep(50);
}
};
public void sleep(long delay) {
this.removeMessages(0);
sendMessageDelayed(obtainMessage(0), delay);
};
};