0

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!

Community
  • 1
  • 1
Pier Giorgio Misley
  • 4,977
  • 2
  • 20
  • 59
  • So you have an app which has its own credentials but this app can open other apps like fb,with different credentials.The credentials of your app should not always be same to the credentials of the opened apps like fb in this case.Is that right?Its like parallel credentials login – debo.stackoverflow May 10 '17 at 08:39
  • you can check this link. cite:- https://source.android.com/devices/tech/admin/multiuser-apps – debo.stackoverflow May 10 '17 at 08:43
  • @debo.stackoverflow thanks for replying! yeah my app can also have no credentials (parallel has not for logging, it simply takes play store ones I think) but this is the concept yes! let me look at your link, thanks! – Pier Giorgio Misley May 10 '17 at 08:50
  • @debo.stackoverflow probably I didn't understand it, but it doesn't seem to solve my problem, I need to launch another app as another user, not my app as another user.. did I missunderstand it? – Pier Giorgio Misley May 10 '17 at 11:03
  • Have understood your problem.Also just wanted to know do you want to maintain two different instances of the fb app.Or do you just want that everytime the fb app opens it will prompt login? – debo.stackoverflow May 10 '17 at 11:33
  • check this link.To logout from fb programmatically in java using facebook sdk 4 cite:- http://stackoverflow.com/questions/29305232/facebook-sdk-4-for-android-how-to-log-out-programmatically. But in a simpler way if you press back from your "2nd opened app" , try to logout of the "2nd opened app" programmatically.otherwise sorry myself have to research more.You can use bounty if you want :) – debo.stackoverflow May 10 '17 at 11:39
  • ok have researched and found out that the company behind "Parallel space" app used multiDroid technology. "Highlights: • Powerful, stable & easy-to-use. • Unique: Parallel Space is based on multiDroid, the first application virtualization engine on Android." So to implement what you want , can use this multiDroid technology – debo.stackoverflow May 10 '17 at 12:18
  • @debo.stackoverflow wow thanks a lot! yeah my problem was exactly this: mantain two separate istances and multidroid is, as you said, the solution! I searched a bit about it but not really easy to find.. I find your question, gonna follow it thanks for your precious help! – Pier Giorgio Misley May 10 '17 at 12:35
  • 1
    thanks for your question too. Found out about this functionality and hopefully can implement sooner than later :) – debo.stackoverflow May 10 '17 at 12:59

0 Answers0