Run app in background

I want to make app run in background. How can I do that? -->That means whenever I press the Android multi-tasking button to ACTIVE, app will continue its next action :sweat:

@manhnt ===
Difficult to answer precisely without seeing some code; what is the “previous action”? what is the “next one” - How your app goes running in the background?? - Yet, globally you have (probably) to save some values in onPause() then retrieve these values or other in onResume().