-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Push notifications #27
Comments
It would be really cool to have that, but for any kind of push services (maybe with a websocket) I would need a webserver, but I don't have one. And even if I were to rent one, I'm not sure I'd have the time and skills to maintain the server all the time. Also, I had to think about how to finance the server. |
I understand it's not easy. Maybe a solution can be found. Maybe you can find contributors who love to maintain a server. Would funding help? The project might have a good chance to get funding from Prototype Fund. |
Maybe unified push could be used so that it will still be compatible with F-Droid? Fluffychat does this for example. |
There is for example Ntfy . |
@budda85 yeah Fluffy just uses unified push, which Ntfy happens to be one provider for... |
I'm not sure if an ntfy server alone would cut it. Aren't the UnifiedPush endpoints autogenerated? e.g. https://ntfy.sh/upMg6xDhy2UGUW So we would need an additional service to handle registration and publishing for these endpoints. Being able to register a UP receiver for a predefined server and topic would avoid that. @binwiederhier is this possible? |
@binwiederhier (had a typo in your username) |
Yes, just UnifiedPush alone won't do. Currently, the app talks to the government API every so often. But, for push, there would need to be a server that talks to that API, perhaps every 15 seconds, and then pushes to everyone registered on that server. @vkrause is currently experimenting with a server like that for KDE, and since it sends data over UnifiedPush, it should work even for an Android app. See: https://floss.social/@VolkerKrause/109477562343881737 |
I have seen people successfully parse server notifications to an https endpoint, tricking the server into sending to a UP distributor. But with no insight into NINAs communication protocol, that wont be viable. |
@ChaosNicro I am not sure I understood your post correctly. Can you give me an example of someone who has done this? |
Btw, here's a quick update on this topic. We are currently experimenting with a push server written with NodeJS that uses unifiedPush to manage subscriptions and send push notifications. The server is of course also open source https://github.com/nucleus-ffm/foss_warn_server. At the moment it is still very simple and limited to the bare essentials - just for experimenting. The Flutter part is also in progress in the https://github.com/nucleus-ffm/foss_warn/tree/push-service branch. Since the whole server part is new to me, it would be great if someone would help me with it However, there is a big problem at the moment. The Flutter connector https://github.com/UnifiedPush/flutter-connector is not compatible with the AlarmManager at the moment. When the AlarmManager is initialized, the callback functions of the Flutter connector for e.g. new Message are not called. I have already created an issue for this UnifiedPush/flutter-connector#123 If someone here has an idea how to fix this, maybe they can help to solve the problem. |
Sorry, I was drawing from Telegram-FOSS-Team/Telegram-FOSS#577 (comment) |
@nucleus-ffm I have tested with Edit: False alert :( |
I have probably been too fast with my tests with Foss_Warn. Sorry for the ping |
When I try running foss_warn_server, I get this error in the console:
Must I create this file somehow or do you have to check it in to Git? Can the dialog in the app saying that you would need to install a distributor ignored? Could you also give me some more instructions on using the server? I saw you created some python files, do I just have to run testRegistration.py after starting the NodeJS server? |
@MatsG23 Oh yes, sorry. I forgot to check if the db folder existed and if not, to create one. I have corrected this and pushed the changes. Also the FOSS Warn part is now updated. It should work now. How to use the server:
The Python scripts are only for testing the server. They just send a dummy request to the server to check if it works as expected. If you want to test the server, just run the testRegistration.py file and you should get a "success" back. |
So the app uses UnifiedPush for notifications nowadays through the use of FOSS Public Alert Server (FPAS), replacing the custom FOSSWarn specific server. With that, I'm closing this issue. |
As it can be critical that notifications are delivered instantly, Push notifications should be used when technically possible. (Android with Google Services or microG)
If not possible, tell the user that it takes up to 15 minutes to manually check and offer instructions to install microG (it is very hard, maybe not viable).
This might decide between live and death of a user or their family!
The text was updated successfully, but these errors were encountered: