presence.nvim icon indicating copy to clipboard operation
presence.nvim copied to clipboard

Termux support?

Open budchirp opened this issue 3 years ago • 16 comments

.

budchirp avatar Nov 05 '21 19:11 budchirp

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?

andweeb avatar Nov 05 '21 21:11 andweeb

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 avatar Nov 14 '21 03:11 Iamafnan

Here is the log IMG_20211114_091604

Iamafnan avatar Nov 14 '21 03:11 Iamafnan

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

Iamafnan avatar Nov 14 '21 10:11 Iamafnan

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!

andweeb avatar Nov 14 '21 23:11 andweeb

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

My Discord Afnan#0115

Iamafnan avatar Nov 18 '21 01:11 Iamafnan

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

Iamafnan avatar Nov 18 '21 02:11 Iamafnan

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

budchirp avatar Nov 18 '21 07:11 budchirp

Hey is there any update regarding this issue?

Iamafnan avatar Feb 04 '22 23:02 Iamafnan

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?

andweeb avatar Feb 09 '22 21:02 andweeb

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

Iamafnan avatar Feb 11 '22 02:02 Iamafnan

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

OrdinaryEnder avatar Sep 26 '22 11:09 OrdinaryEnder

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

Using tokens to set presence is against to the TOS.

budchirp avatar Oct 07 '22 18:10 budchirp

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

OrdinaryEnder avatar Oct 08 '22 08:10 OrdinaryEnder

The only way is to have rooted smartphone

putra4648 avatar Nov 07 '22 17:11 putra4648

Something new?

kaicsm avatar Feb 25 '24 22:02 kaicsm