i have made an Qr-Scanner now the activity has button. if i click the button it opens the scanner so i'm doing good with it, but if i go back to the previous activity without clicking the button i get the NullPointerException from the onPause() .
@Override
public void onPause() {
super.onPause();
mScannerView.stopCamera();
}
if i go to previous activity without opening the camera then it is giving the error. someone help me