turt2live / matrix-wishlist

Bridges, bots, and other tooling requested by community members
55 stars 2 forks source link

Matrix bridge for Android messenger apps (WhatsApp, Hangouts, Viber, etc) via Android gateway app #159

Open MurzNN opened 6 years ago

MurzNN commented 6 years ago

In Android there are exists some apps, that can bridge messages from other Android messenger apps (WhatsApp, Telegram, Hangouts, Facebook Messenger, Line, Viber) to desktop computer, and reply to them via desktop computer too, here is some examples: Pushbullet, AirDroid.

We can reuse this idea for implement universal bridge from any mobile messenger app to Matrix as Android application. This seems the only one way of implementing Matrix bridge for apps like WhatsApp, that don't provide API for third-party clients.

This app must listen system notifications, detect messenger app type and sender id, convert it to matrix message, and send to Matrix server. Also it must listen incoming messages (replies) from Matrix side and forward them as `reply' back to messenger app. For implementation without phone - this infrastructure can be can be started in Android emulator.

Let's discuss here this idea and ways of implementation, post links to same project.

MurzNN commented 6 years ago

At now there are exist Matrix<->SMS bridge SmsMatrix that works via same way for bridging to Matrix, but it have direct access to SMS storage.

MTRNord commented 6 years ago

Whatpsapp has already a issue: #74

turt2live commented 6 years ago

Related:

A universal bridge would help close all of the issues. I'll label this as a "discussion" rather than a bridge.

chiddekel commented 6 years ago

The best solution is sandboxing app. Map the require WhatsApp functions. And use as one app. Instalation of messangers independly. It's quite easy and elegant solution.

oblak-be commented 5 years ago

just wanna say I like this idea very much (a good year later) :). I implemented turt2live's Dimenion service (dimension.oblak.be) and I'm very interested in offering more bridges than the ones already included by default.

With the described idea i image a bot that you feed the credentials of the social accounts you want to couple, then the bot does all the magic behind the scenes. I guess it's the most interesting for users if they have one "control" room and then a room per social account that includes the addressbook on the social platforms end (eg the friendlist on facebook) as invited accounts or something.

Just freewheeling, keep up the good work!

eniac111 commented 4 years ago

Another bizarre idea. If there is a good open source. If there is a good open source tool for desktop automation, the desktop app for Viber may be sandboxed in a Docker container with x11 headless server. Still, it will work only for one person.

MurzNN commented 4 years ago

the desktop app for Viber may be sandboxed in a Docker container with x11 headless server

The main problem is that Viber desktop will not work without loaded Viber client on your phone, so you will still need "Android Phone + Viber Android app + Docker with Viber desktop app". Same with WhatsApp and some other popular messengers.

CyberShadow commented 2 years ago

The main problem is that Viber desktop will not work without loaded Viber client on your phone, so you will still need "Android Phone + Viber Android app + Docker with Viber desktop app". Same with WhatsApp and some other popular messengers.

I think this is the case for Whatsapp, but I don't think that's true for Viber. You only need the phone and Android app for the initial setup, after that you can use the PC / Linux desktop app stand-alone.

MurzNN commented 2 years ago

I think this is the case for Whatsapp, but I don't think that's true for Viber. You only need the phone and Android app for the initial setup, after that you can use the PC / Linux desktop app stand-alone.

The problem is that for WhatsApp you can use a web interface, that can be easily debugged and you can simulate its queries, but Viber has only the Desktop app with closed sources :( So we can't easily debug it and simulate its queries in a matrix bridge.

CyberShadow commented 2 years ago

The bulk of the implementation of the Android app lies in native-code libraries (shared objects) accessed via JNI. One way I thought of approaching this problem would be to run the libraries using a CPU emulator like Unicorn Engine, and talk to them via the same JNI API. The bridge would require users to acquire an APK of the app as part of the setup, which is somewhat impractical but may be less impractical than reverse engineering the protocol and encryption.