An application behaves differently when running in foreground than in background because of the limitation of resources on iOS devices.