I called finish() on my MainActivity on some button click and to stop the application. but when the function is called the application is finished but another app behind my app in application stack comes to foreground.
This is not what i want. i just want to stop my app , that's it. not start some another app which is annoying for the user as he/she has not started it.
Any suggestion how to solve ?