Unigram: Proposal: should I add desktop bridge?

Created on 11 Dec 2020  路  27Comments  路  Source: UnigramDev/Unigram

I鈥檓 considering once again to use desktop bridge in Unigram.
For the people that don鈥檛 know what I鈥檓 talking about here鈥檚 a bit of context: Unigram uses a technology named UWP, that in short controls how the app behaves and what the app can do. One of the downsides of this technology is that the app runs in a sandbox, and some basic features can鈥檛 be implemented because of this.
To mention some, I鈥檓 referring specifically to:

  • System tray icon for old school afficionados
  • Push to talk feature for upcoming voice chats
  • Out of the box ability to connect to localhost proxies

While the long term plan is to migrate to a more flexible and modern tech later in 2021/2022, I would already like to implement the mentioned features already, as postponing them for two more years doesn鈥檛 sound like a good idea to me.
This shouldn鈥檛 have any downside for the users, but it does for me, as it will significantly increase the time needed to release Store updates and somehow code complexity as well, so I鈥檓 not a big fan and that鈥檚 why this thing was added and removed multiple times from the app.

I know that some users don鈥檛 really like desktop bridge, and I would like to hear from you: is anyone strongly against it? If yes, why?

All 27 comments

runs in sandbox is more secure, isn't it?

runs in sandbox is more secure, isn't it?

It depends from which perspective you see this: it is more secure if you, as a user, download some random software from the web: running in the sandbox it can't harm your PC. But if the software in question is known and open source, this shouldn't be a problem, right?

Also, the main app will still run within the sandbox, it will simply have a helper Win32 process running along side that will do all the stuff that UWP apps themselves can't do, but it will still have all the restrictions applied by the Store.

I'm not a fan of this mostly because all the stuff that I'd like to have should be supported by UWP already in my opinion, and this contraption shouldn't be needed.

I don't think it's worthy for tray icon/notifications, but for push to talk it'll definitely make sense

I don't think it worth it we can pretty much live without that three options

For me having a tray icon brings the benefit if not having to have unigram open all the time to receive messages. PTT would be a cool feature potentially, but I'm nit really planning on using the voice chat right now. But if having the desktop bridge complicates the development and the releases significantly I think I could live without it.

For me having a tray icon brings the benefit if not having to have unigram open all the time to receive messages. PTT would be a cool feature potentially, but I'm nit really planning on using the voice chat right now. But if having the desktop bridge complicates the development and the releases significantly I think I could live without it.

That's already possible, once you close the app, you will continue to receive push notifications

I don't like tray icon, but I had some problems with localhost proxies, I couldn't connect using shadowsocks.
Using UWP makes unigram protable cross Desktop, Mobile (rip), Xbox, and other platforms. It can be an advantage for you.

For me having a tray icon brings the benefit if not having to have unigram open all the time to receive messages. PTT would be a cool feature potentially, but I'm nit really planning on using the voice chat right now. But if having the desktop bridge complicates the development and the releases significantly I think I could live without it.

That's already possible, once you close the app, you will continue to receive push notifications

Nope, doesn't work for me. When I open the app, I can see all the messages getting downloaded and updated both read and unread ones. I know there were a bunch of gh issues for this, but it has never worked for me reliably. And yes background execution is allowed for Unigram.

I don't like tray icon, but I had some problems with localhost proxies, I couldn't connect using shadowsocks.
Using UWP makes unigram protable cross Desktop, Mobile (rip), Xbox, and other platforms. It can be an advantage for you.

I managed to connect using shadowsocks by using this:
https://github.com/tiagonmas/Windows-Loopback-Exemption-Manager
try it out. You'll have to use one server; options like load balancing don't work.
As for desktop bridge, as long as this effects the speed of development it's not worth it.

Also, the main app will still run within the sandbox, it will simply have a helper Win32 process running along side that will do all the stuff that UWP apps themselves can't do, but it will still have all the restrictions applied by the Store.

This will make the app slower and heavier in a sense that it will need a separate process(es) everytime it's launched and opened, and keeping alive the said process will cost many resources, imo the current setup is already heavy enough on it's own (isn't it?)

Furthermore, this will make it less secure, and any unauthorised process might execute in the backround, since it won't be a fully UWP app anymore, making it prone to unauthorised access to open/closed ports on the PC, other executables in C:, and etc,.

I have been using instant messengers on a desktop since 1998 (ICQ, AIM, Yahoo). All of them were located in the system tray.
Skype, Telegram, Discord and Signal could still be configured to behave so.
I am used to close such apps by clicking on the X - Unigram closes :-(
So it would be very nice if you could add desktop brigde to support it!

I am used to close such apps by clicking on the X - Unigram closes :-(
So it would be very nice if you could add desktop brigde to support it!

When you close unigram, its window gets closed, but it's still running in background and you will get notification when you got new message. this behavior is just like what happens on mobile devices. you can pin unigram on taskbar and open it by clicking its icon on taskbar. it's not a problem.

I am used to close such apps by clicking on the X - Unigram closes :-(
So it would be very nice if you could add desktop brigde to support it!

When you close unigram, its window gets closed, but it's still running in background and you will get notification when you got new message. this behavior is just like what happens on mobile devices. you can pin unigram on taskbar and open it by clicking its icon on taskbar. it's not a problem.

Unfortunately, this doesn't work, at least not on my 2 machines, closing the Unigram window effectively means closing the app altogether.

@electronic-dk Have you allowed background apps to run in Settings > Privacy & Security > Background apps?

Unfortunately, this doesn't work, at least not on my 2 machines, closing the Unigram window effectively means closing the app altogether.

I don't know why it's not working for you but it works for me.

@electronic-dk Have you allowed background apps to run in Settings > Privacy & Security > Background apps?

Yep.
I've been using Unigram for quite some time already and the background notifications have never worked reliably for me.
Apart from that the tray icon is convenient to quickly control your online status, quit the app and see if you have any messages that you don't want to be notified about. But I understand that unfortunately there's no easy-to-use and reliable API for it now so the downsides of having the tray icon via a workaround/hack may outweigh the positive sides.

Yeah Unigram notifications seem to be unreliable on beta 5952

For me notifications seem to be reliable, but I think I close the program actually not very often.

But to the actual topic of this issue. I would prefer not to have an tray icon. I already find it clutters with to many apps that want to show an icon there. It is also not visible in tablet mode.

But I also don't mind the desktop bridge if it would be optional. Maybe it can be installed using the plugin architecture of the Store.

Oh, and it would be nice if it would still run on Windows 10 Mobile ;)

Oh, and it would be nice if it would still run on Windows 10 Mobile ;)

Unigram Mobile Messenger is the app you need :)

Oh, I thought it is the same project...

Oh, and it would be nice if it would still run on Windows 10 Mobile ;)

Unigram Mobile Messenger is the app you need :)

Oh...
I thought this is the same project

@electronic-dk Have you allowed background apps to run in Settings > Privacy & Security > Background apps?

I don't have an option named "Background apps", running Unigram 7.3 (5951) X64.

@electronic-dk Have you allowed background apps to run in Settings > Privacy & Security > Background apps?

I don't have an option named "Background apps", running Unigram 7.3 (5951) X64.

Those are system settings, not the ones within Unigram

I don't have an option named "Background apps", running Unigram 7.3 (5951) X64.

Those are system settings, not the ones within Unigram

tnx, in system settings it is enabled.

The thing is that notifications in background ARE SUPPOSED TO WORK, but they DON'T WORK for some reasons over the last months, but I remember in the past they used to work properly

Speaking from a blind user perspective, I access Unigram by using the JAWS and NVDA screen readers. Unigram is important for us as official telegram desktop is 0 percent usable.

Desktop bridge sounds like something I want. I was disappointed when Unigram disappeared from the system tray. Every messaging app I use can be there, some can't even be disabled from it. Even Skype does, and did back in the day when it was also a UWP app.

I like the idea of push to talk hotkey, that is something I go to Teamtalk for, being able to do that with Unigram would have implications on the usefulness of this app. I would like for the hotkey to work while Unigram is in the background, of course.

Other considerations: if you press windows+m on the keyboard to minimize all open programs and go to the desktop, Unigram stops transmitting. If you are in a call or a voice chat, they can no longer hear you. It continues to work fine if you instead press windows+b to focus the system tray then move to the desktop by pressing tab.

This issue was not present in the UWP version of Skype, but if Desktop Bridge can aide in fixing that, it would really be a huge help. Voice chatting doesn't rely on you staying right in the window of the chat program for any other app that I'm familiar with.

Ditto if your display turns off. Start recording a message and go a little long winded, your display timeout occurs and you are no longer being recorded. If you're totally blind you don't even know it has stopped recording. Same issue appears when in a call or a voice chat, they can no longer hear you until you wake the screen back up. I'm not speaking of going to sleep, not even one of the newfangled connected sleep modes, all this is is just disabling the display backlight. Some machines, Asus mostly, do tend to lock the screen when this happens but other computers just leave you right where you were, even still focused in unigram and the problem still occurs. If this desktop bridge offers a way to solve that, I'm definitely pushing for that. This issue was not present in the old UWP version of Skype.

Lastly, you touched briefly on the idea of switching to a more modern programming language in 2022 or so. I'd like to politely request that you use something native and attempt to maintain and even improve on the screen reader usability of the new app. I'm not sure what would be considered modern, but Python with Pywin32 for the GUI etc. I'm not sure about Java at this point, that's a bit messy. Some versions of QT are screen reader accessible while others aren't. There's always Electron, but at this stage I'm very displeased with most of the Electron apps I have the misfortune to use, Skype chiefly among them. That said though, they can work well, Discord is a decent example.

There you have it, my biased viewpoint, but on the whole, such a change could make or break all blind user's access to Telegram from Windows devices seeing as how Telegram Desktop app hasn't seen fit to be even the slightest bit usable, we've all been relying heavily on Unigram and I for one am very thankful and appreciative that you've done so well by us so far and definitely hope we're in mind as you move forward.

Unigram is doing an excellent job the way it is now. I'm not sure if "porting" it to an old-school Win32 app (with some MSIX package restrictions still applied) will introduce other limitations or change existing behaviour, but altogether, I suppose it's not worth the hassle. Not sure if the technology for things like "Share to" and other activation events is even ready for Project Reunion-apps...

A UWP advantage (in my view) is that they generally rund better on low end devices. If I constantly had to run a full process with all its assets in the background (probably like the original Telegram Desktop.exe), I'm sure I would think twice before even attempting to launch it on something like my good old Surface 3.

So if i'm understandin this correctly, the options are:

  1. UWP
  2. Non-UWP + desktop bridge

pros of non-UWP + bridge:

  1. Not in a sandbox, less limitations on things you want to implement.
    1b. if you don't implement certain features, users might move to other apps which support it.
    cons:
  2. not in a sandbox, less Secure. I assume that it's both less secure in the sense that your program can more easily perform malicious actions, and that malicious programs can modify your program, read the memory region it's using, etc.
  3. longer time to update, as complexity is increased.
  4. UWP allows you to publish the app for xbox, mobile more easily, so not using it is a big con if you have plans to publish there.

not sure if 2 is a con for bridge of UWP.

I don't have very strong feelings one way or the other. PTT is something i'd like, so i'm leaning towards bridge because of it.
But i can easily live without it, and i also don't want to have more trouble developing it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

HimbeersaftLP picture HimbeersaftLP  路  3Comments

ChungZH picture ChungZH  路  4Comments

framctr picture framctr  路  5Comments

TheGuardianWolf picture TheGuardianWolf  路  4Comments

MarcAnt01 picture MarcAnt01  路  5Comments