I am afraid that you want to do something impossible.
Try to find an application, which does exactly what you want. Probably, it will be possible to understand how it works.
Multi-windows is not a good solution anyway.
1) Android 7+ only
2) applications are able to prevent this mode (for example, my bank's application detects this mode and refuse to work due to sequrity reasons.
More or less realistic - to use notifications.