when trying to navigate to next activity after Alert Dialog, then I am getting
this error:
Activity has Leaked window DecorView@a61b0ed[] that was originally addded here
here is the snippet:
if (alert1 != null && alert1.isShowing()) {
alert1.dismiss();
}
builder.setCancelable(true);
final AlertDialog alert1 = builder.create();
alert1.show();
onPause();
final Timer t = new Timer();
t.schedule(new TimerTask() {
@Override
public void run() {
alert1.dismiss();
t.cancel();
}
}, 3000);
if (updatedQnty.equals("order full")) {
Intent intent = new Intent();
setResult(Activity.RESULT_OK, intent);
finish();
// callForDestroy(alert1);
}else{
mScannerView.resumeCameraPreview(this);
}