Single app instance in one android device

I am having a big trouble in this dual app/ dual space manner. I need a way to ensure that the app is only installed once per device or the multiple app instance will use the same user account.Thereby a device will have only one account associated with it.

enter image description here Those who you don't know it can be done. there is example