I try to explain what I mean: as asked and replyied here you can launch an application from your own.
The problem is the following: I don't need only to run an application from mine, but I also need to run it with different credentials from the same application installed in my phone, so I need to run it with a different account.
For example:
With my application I want to run Facebook. Fine, I run my code by starting an intent with fb package name.
My problem is that I don't want to run facebook and find myself logged with my profile(the one logged in my phone) but I want facebook to be run as if it was a new and clear installation (it must prompt me for login with my credentials) and this must not remove my credential from my application in my home screen.
It's like creating another user on your phone and using an app on both users. The difference is that I want to do it with my app instead of with another user.
Probably my explaination is not perfect, I tried my best but it's hard to explain what I'm looking for. I know it is possible because this application does it, but I can't figure out how.
Thanks all for the help!