It is one of the tasks of the Android operation system to decide which app is not used anymore. It is your task as an Android developer to develop your app according to this to run it properly.
Please start here to understand the lifecycle of an Android Activity. It will answer your question.
New video tutorial: Lets start simple: Each B4A program runs in its own process. A process has one main thread which is also named the UI thread which lives as long as the process lives. A process can also have more threads which are useful for background tasks. A process starts when the...