andweeb / presence.nvim

Discord Rich Presence for Neovim
816 stars 65 forks source link

Termux support? #44

Open budchirp opened 2 years ago

budchirp commented 2 years ago

.

andweeb commented 2 years ago

Hi @CanKolay5677! I haven't heard of Termux before but it looks like it's a terminal application in... Android? 🤨

So is the idea to set Rich Presence on the Discord app running on your Android device when using Neovim on that same device?

Can you confirm whether you can install the plugin and use Neovim with Termux and paste the logs here?

Iamafnan commented 2 years ago

Hi @CanKolay5677! I haven't heard of Termux before but it looks like it's a terminal application in... Android? 🤨

So is the idea to set Rich Presence on the Discord app running on your Android device when using Neovim on that same device?

Can you confirm whether you can install the plugin and use Neovim with Termux and paste the logs here?

Termux is not supported. I have used presence.nvim in termux and it is unable to set rich presence in android discord app

Iamafnan commented 2 years ago

Here is the log IMG_20211114_091604

Iamafnan commented 2 years ago

Use can use other packages like ip,nmap,ifconfig instead of netstat as it requires root access in many android devices

andweeb commented 2 years ago

Hi @Iamafnan thanks for providing those logs! That's pretty interesting... I would've expected an ENOENT error instead of an ECONNREFUSED error. In other words it looks like the socket may actually exist at the expected path but communicating with it is unsupported.

The netstat command doesn't play a part in connecting with Discord since it's only used for synchronizing state between multiple Neovim instances. The main problem is the nil Discord IPC socket type and the subsequent failures to connect to Discord.

To be honest, I'm a little doubtful that Android support is possible. I'd imagine the model for Android support would be similar to WSL support, but I'm only able to support WSL due to Windows/WSL Interop with AF_UNIX. I'm not familiar with Termux but it requires not only supporting a socket relay between Android and the Termux Linux environment, but also the Discord app to keep an IPC socket open on the main OS.

That said, in doing some light research online on Discord Rich Presence on Android, it seems that only Samsung phones are supported and only through some Samsung account linking process, not actually through Discord RPC.

If I have some time I'll do some testing with Anbox or something. @Iamafnan @CanKolay5677 If you have any more info that you think would be helpful I'd really appreciate it!

Iamafnan commented 2 years ago

@andweeb Ya sure anytime you wanna test presence.nvim, you can dm me on discord

My Discord Afnan#0115

Iamafnan commented 2 years ago

I wanna show these logs, There is a new error in the logs IMG_20211118_072824

budchirp commented 2 years ago

Use can use other packages like ip,nmap,ifconfig instead of netstat as it requires root access in many android devices

In adb shell I can use netstat it wont require root.

netstat.log

Iamafnan commented 2 years ago

Hey is there any update regarding this issue?

andweeb commented 2 years ago

Hi @Iamafnan, sorry no updates yet! I haven't had much time lately to set up Neovim on Android to investigate how to achieve Android support.

First thing to determine whether this would be possible in the first place would be to look for the Discord IPC socket. Would you mind looking for a discord-ipc-0 socket on your system, either in the Android OS or Termux?

Iamafnan commented 2 years ago

Okey I'll try to find the discord-ipc-0 socket in my android

OrdinaryEnder commented 1 year ago

This only possible with token, shall add token support for it,

budchirp commented 1 year ago

This only possible with token, shall add token support for it,

Using tokens to set presence is against to the TOS.

OrdinaryEnder commented 1 year ago

Yea, but we can't make discord mobile connect to current termux socket since android selinux rules

putra4648 commented 1 year ago

The only way is to have rooted smartphone

kaicsm commented 7 months ago

Something new?