Well, I have an Android app in which I have the following so far: The login screen and a "Welcome" screen, the point is that when the user manages to enter with the correct email and password I take him with an Intent to the screen of "Welcome", but by clicking on the "back" button he can return to the login screen, which I do not want to happen.
Regularly the Login or Splash screens start a MainActivity depending on authentication or certain features after allowing entry to the application.
Therefore by allowing input to MainActivity you end your previous screen (login or splash) with
finish()
Example:
You can add in your file
AndroidManifest.xml
the attributeandroid:noHistory="true"
in the Activity that you don't want them to be able to return to.For example: