class BaseRegisterActivity extends SecuredNativeSmartRegisterActivity implements BaseRegisterContract.View {

    @Override
    public void onRequestPermissionsResult(int requestCode,
                                           @NonNull String permissions[], @NonNull int[] grantResults) {
        switch (requestCode) {
            case PermissionUtils.CAMERA_PERMISSION_REQUEST_CODE:
                if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
                    try {
                        Intent intent = new Intent(this, BarcodeScanActivity.class);
                        startActivityForResult(intent, AllConstants.BARCODE.BARCODE_REQUEST_CODE);
                    } catch (SecurityException e) {
                        Utils.showToast(this, getString(R.string.allow_camera_management));
                    }
                } else {
                    Utils.showToast(this, getString(R.string.allow_camera_management));
                }
                break;
            default:
                break;
        }
    }

}