Badly working Intent in my app : Hello Stackoverflow community!
Recently, a strange error occured to me. It is with a button in my app. When i press it there is nothing happening. No errors, or crashes but also Intent is not functioning. The transition to DeleteAccountActivity is not happening. I don't know why is this happening. The intent which I am using is very simple(passes nothing). Please help me



AccountSettingsActivity.java




    public class AccountSettingsActivity extends AppCompatActivity {
    
        private static final String TAG = "AccountSettingsActivity";
        private static final int ACTIVITY_NUM = 4;
        private  String user_id;
    
    
    
    
        private Context mContext;
        public SectionsStatePagerAdapter pagerAdapter;
        private ViewPager mViewPager;
        private RelativeLayout mRelativeLayout;
        private Button mDelete;
        User mUser;
    
        @Override
        protected void onCreate(@Nullable Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_accountsettings);
            mContext = AccountSettingsActivity.this;
            Log.d(TAG, "onCreate: started.");
            mViewPager = (ViewPager) findViewById(R.id.viewpager_container);
            mRelativeLayout = (RelativeLayout) findViewById(R.id.relLayout1);
            mDelete = (Button) findViewById(R.id.btnDelete);
            User mUser = new User();
            setupSettingsList();
            setupBottomNavigationView();
            setupFragments();
            getIncomingIntent();
    
            //setup the backarrow for navigating back to "ProfileActivity"
            ImageView backArrow = (ImageView) findViewById(R.id.backArrow);
            backArrow.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    Log.d(TAG, "onClick: navigating back to 'ProfileActivity'");
                    finish();
    
                    mDelete.setOnClickListener(new View.OnClickListener() {
                    @Override
                        public void onClick(View view) {
    
                        Intent intent = new Intent(mContext, DeleteAccountActivity.class);
                        startActivity(intent);
                    }
                    });
                    }
            });
        }
    
    
        private void deleteAccounts(){
    
    
       /*         DatabaseReference deleteUser = FirebaseDatabase.getInstance().getReference("users").child(user_id);
                DatabaseReference deleteUserPhotos = FirebaseDatabase.getInstance().getReference("user_photos").child(user_id);
                DatabaseReference deleteUserPhotoComments = FirebaseDatabase.getInstance().getReference("comments").child(user_id);
    
                deleteUser.removeValue();
                deleteUserPhotos.removeValue();
                deleteUserPhotoComments.removeValue();*/
    
                // getActivity().overridePendingTransition(R.anim.fade_in, R.anim.fade_out);
    
            FirebaseDatabase.getInstance().getReference()
                    .child(getString(R.string.dbname_users))
                 //   .child(FirebaseAuth.getInstance().getCurrentUser().getUid())
                    .child(mUser.getUser_id())
                    .removeValue();
    
         /*   FirebaseDatabase.getInstance().getReference()
                    .child(getString(R.string.dbname_followers))
                    .child(mUser.getUser_id())
                    .child(FirebaseAuth.getInstance().getCurrentUser().getUid())
                    .removeValue(); */
    
    
        }
    
        private void getIncomingIntent(){
            Intent intent = getIntent();
    
            if(intent.hasExtra(getString(R.string.selected_image))
                    || intent.hasExtra(getString(R.string.selected_bitmap))){
    
                //if there is an imageUrl attached as an extra, then it was chosen from the gallery/photo fragment
                Log.d(TAG, "getIncomingIntent: New incoming imgUrl");
                if(intent.getStringExtra(getString(R.string.return_to_fragment)).equals(getString(R.string.edit_profile_fragment))){
    
                    if(intent.hasExtra(getString(R.string.selected_image))){
                        //set the new profile picture
                        FirebaseMethods firebaseMethods = new FirebaseMethods(AccountSettingsActivity.this);
                        firebaseMethods.uploadNewPhoto(getString(R.string.profile_photo), null, 0,
                                intent.getStringExtra(getString(R.string.selected_image)), null);
                    }
                    else if(intent.hasExtra(getString(R.string.selected_bitmap))){
                        //set the new profile picture
                        FirebaseMethods firebaseMethods = new FirebaseMethods(AccountSettingsActivity.this);
                        firebaseMethods.uploadNewPhoto(getString(R.string.profile_photo), null, 0,
                                null,(Bitmap) intent.getParcelableExtra(getString(R.string.selected_bitmap)));
                    }
    
                }
    
            }
    
            if(intent.hasExtra(getString(R.string.calling_activity))){
                Log.d(TAG, "getIncomingIntent: received incoming intent from " + getString(R.string.profile_activity));
                setViewPager(pagerAdapter.getFragmentNumber(getString(R.string.edit_profile_fragment)));
            }
        }
    
        private void setupFragments(){
            pagerAdapter = new SectionsStatePagerAdapter(getSupportFragmentManager());
            pagerAdapter.addFragment(new EditProfileFragment(), getString(R.string.edit_profile_fragment)); //fragment 0
            pagerAdapter.addFragment(new SignOutFragment(), getString(R.string.sign_out_fragment)); //fragment 1
         //   pagerAdapter.addFragment(new DeleteAccountFragment(), "Delete Account");
        }
    
        public void setViewPager(int fragmentNumber){
            mRelativeLayout.setVisibility(View.GONE);
            Log.d(TAG, "setViewPager: navigating to fragment #: " + fragmentNumber);
            mViewPager.setAdapter(pagerAdapter);
            mViewPager.setCurrentItem(fragmentNumber);
        }
    
        private void setupSettingsList(){
            Log.d(TAG, "setupSettingsList: initializing 'Account Settings' list.");
            ListView listView = (ListView) findViewById(R.id.lvAccountSettings);
    
            ArrayList<String> options = new ArrayList<>();
            options.add(getString(R.string.edit_profile_fragment)); //fragment 0
            options.add(getString(R.string.sign_out_fragment)); //fragement 1
      //      options.add("Delete Account");
    
            ArrayAdapter adapter = new ArrayAdapter(mContext, android.R.layout.simple_list_item_1, options);
            listView.setAdapter(adapter);
    
            listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
                @Override
                public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                    Log.d(TAG, "onItemClick: navigating to fragment#: " + position);
                    setViewPager(position);
                }
            });
    
        }
    
    
        /**
         * BottomNavigationView setup
         */
        private void setupBottomNavigationView(){
            Log.d(TAG, "setupBottomNavigationView: setting up BottomNavigationView");
            BottomNavigationViewEx bottomNavigationViewEx = (BottomNavigationViewEx) findViewById(R.id.bottomNavViewBar);
            BottomNavigationViewHelper.setupBottomNavigationView(bottomNavigationViewEx);
            BottomNavigationViewHelper.enableNavigation(mContext, this,bottomNavigationViewEx);
            Menu menu = bottomNavigationViewEx.getMenu();
            MenuItem menuItem = menu.getItem(ACTIVITY_NUM);
            menuItem.setChecked(true);
        }
    
    
   }



DeleteAccountActivity.java





    public class DeleteAccountActivity extends AppCompatActivity {
    
        Button yesButton;
        Button cancelButton;
        Context mContext;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            Intent intent = getIntent();
            setContentView(R.layout.activity_delete_account);
    
            yesButton = (Button) findViewById(R.id.btnDelete2);
            cancelButton = (Button) findViewById(R.id.btnDelete3);
    
            yesButton.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    deleteAllData();
    
                    Intent intent = new Intent(mContext, RegisterActivity.class);
                    startActivity(intent);
                }
            });
        cancelButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(mContext, AccountSettingsActivity.class);
    
            }
        });
        }
    
            public void deleteAllData(){
    
                DatabaseReference deleteUser = FirebaseDatabase.getInstance().getReference()
                        .child("users")
                        .child(FirebaseAuth.getInstance().getCurrentUser().getUid());
    
                DatabaseReference deleteUserPhotos = FirebaseDatabase.getInstance().getReference()
                        .child("user_photos")
                        .child(FirebaseAuth.getInstance().getCurrentUser().getUid());
    
                DatabaseReference deleteUserPhotoComments = FirebaseDatabase.getInstance().getReference()
                        .child("user_account_settings")
                        .child(FirebaseAuth.getInstance().getCurrentUser().getUid());
    
                DatabaseReference deleteUserFollowing = FirebaseDatabase.getInstance().getReference()
                        .child("following")
                        .child(FirebaseAuth.getInstance().getCurrentUser().getUid());
    
                DatabaseReference deleteUserFollowers = FirebaseDatabase.getInstance().getReference()
                        .child("followers")
                        .child(FirebaseAuth.getInstance().getCurrentUser().getUid());
    
                deleteUser.removeValue();
                deleteUserPhotos.removeValue();
                deleteUserPhotoComments.removeValue();
                deleteUserFollowing.removeValue();
                deleteUserFollowers.removeValue();
    
    
        }
    
        }



