You can use the Intent-Flag
FLAG_ACTIVITY_CLEAR_TOP
If you don't have many Activities
then you can simply create an onClick
in each that is something like
Intent intent = new Intent(CurrentActivity.this, HomeActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
this flag will take you back to the "Home" Activity
and clear all others off of the stack
If you have many Activities
then it may be easier to create a base Activity
from which to extend all others and include the home button functionality inside that base Activity