I want to prevent the user from going back to the previous screen. So I added code, but this does not work. Are there any solutions for this? The alert pop up is seen but \"
Onclick of hardware back button OnBackPressed callback gets called
you can just remove super declaration in onBackPressed call back.
@Override public void onBackPressed() { }