Both Android and iOS platforms embrace the concept that mobile apps are not exited but moved from one state (active, in the foreground) to another (inactive, in the background) and if the OS is short on resources it may destroy/stop an inactive apps. This provides a better user experience as the app will load quicker if it is in the background vs. when it is cold started. Therefore both iOS and Android does not provide an API to terminate an application.
The states that an app goes through in iOS and Android differ slightly, please review them in details:
- iOS app life cycle
- Android app life cycle.
I hope this helps.