Understanding Persistent Connections for Custom Push Notification Services in Android

Hello F-Droid Community,

I hope this message finds you all well. My name is [Your Name] and I am currently conducting research on the implementation of custom push notification services in Android applications.

I am particularly interested in understanding how to create a persistent connection in Android, similar to the tgnet connection used by Telegram, to connect to a custom push server. My goal is to develop a deeper understanding of how such a connection can be maintained without being closed by the Android system, even when the app is not in the foreground. This seems to be a key feature of Telegram’s notification system, and I am curious about how it could be implemented in a custom push notification service.

I understand that many of you have extensive experience in this area, and I would greatly appreciate any insights or resources you could share on this topic. If there are any existing threads or resources that you think might be helpful, please feel free to point me in their direction.

Thank you in advance for your time and assistance. I look forward to learning from your collective expertise.

Many apps on F-Droid just keep their own connection open with a permanent notification (see Element, XMPP clients, Telegram FOSS, etc.) but you may also be interested in the work of UnifiedPush:

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.