Running two apps together on a single

Hi,
I’m trying to running two apps on a single android device not emulator. it should work like firtsly open first app do some task and open second app and do some task and return the first app and continue with first task. It should continue where it left.