92lleo / WhatsappWebToGo

[android] WhatsApp Web client for your phone/tablet with media support
https://f-droid.org/packages/io.kuenzler.whatsappwebtogo
MIT License
267 stars 43 forks source link

Link WhatsappWebToGo with WhatsApp on a different user profile? - Foreground Service option might help #95

Open martin-braun opened 2 years ago

martin-braun commented 2 years ago

I'm using GrapheneOS, created multiple users and installed WhatsApp through the Aurora Store on a secondary user profile. Now I wish to link WhatsappWebToGo on my primary user profile with the official WhatsApp on my secondary user profile.

I take a screenshot of the QR code in WhatsappWebToGo and share it to my Saved Messages in Telegram. I switch to my secondary profile and I hit "Link new device" in the official WhatsApp app and I scan the QR code on my Laptop screen where I have Telegram opened. I get "Linking device". Now I switch back to the primary profile with WhatsappWebToGo. I manage to get through the initial state when I switch fast enough, but no messages get downloaded and no contacts are listed. Now I switch back to WhatsApp on my secondary profile, it got the device linked (sometimes, sometimes not), but switching back to my primary profile into WhatsappWebToGo will show a new QR code, so the hand-shake failed.

It seems both apps need to run at the same time to success the hand-shake. GrapheneOS improved security between profiles by pausing all background and normal apps when switching profiles, however foreground apps should remain active, because I manage to get notifications across user profiles from apps that leverage the ForegroundService.

It would be nice if WhatsappWebToGo could offer an option to enable a ForegroundService, so it won't be paused by GrapheneOS when switching profiles. I think this would solve the issue already. I can't use WhatsappWebToGo now, because I also need WhatsApp on the same device (isolated) for some important contacts who wish to video call sometimes. For privacy reasons I can't install WhatsApp on my primary profile, leading me to this issue now.

92lleo commented 1 year ago

Hi @martin-braun sorry for the late feedback. It's already planned to have an option to keep the app alive. I don't know yet how a forground service behaves together with webview, probably it will be just a permanent silent notification or something like that. That should fix your issue

martin-braun commented 1 year ago

@92lleo Thanks, please keep me updated about this, looking forward to get this going. I don't care about notifications from other profiles at this time. It's all about getting the hand-shake going. Checking my WhatsApp without switching my profile to my "social" profile would be a huge upside for me.

If you have an alpha build for me to test, I would be happy to test it and report back.

fossifly commented 10 months ago

Hi @martin-braun I have a similar setup and found a workaround for now (root is probably required):

--> Now, you can use WhatsappWebToGo just fine there and only need to switch if you really require a WhatsApp function that doesn't work here. --> Just use the installation on the secondary profile at least every two weeks, or WhatsappWebToGo will be logged out.

martin-braun commented 10 months ago

@fossifly That's what I'd have done long time ago if I could. I use GrapheneOS and actually want to be root-less for the enhanced security, but thanks for your input, it might help others.

roni1177 commented 1 month ago

[Uploading WhatsappWebToGo-master (3).zip…]()

roni1177 commented 1 month ago

[Uploading WhatsappWebToGo-master (1).zip…]()

roni1177 commented 1 month ago

[Uploading WhatsappWebToGo-master (3).zip…]()

roni1177 commented 1 month ago

__

[Uploading WhatsappWebToGo-master (3).zip…]()

``