[Solved] How to forward my application on login activity after pressing on logout button? [closed]


Try this for your concern

Intent intent = new Intent(CurrentClass.this, LoginActivity.class);
        intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        startActivity(intent);

For ex: Say you have back button named “back”

back.setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View v) {
                // TODO Auto-generated method stub

Intent intent = new Intent(CurrentClass.this, LoginActivity.class);
            intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
            intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            startActivity(intent);

            }
        });

0

solved How to forward my application on login activity after pressing on logout button? [closed]