"Push notifications when in away" option greyed out (#392)
Unknown opened 5 years ago

Describe the bug I would like to receive push notifications even when the app is in the background.

To Reproduce Steps to reproduce the behavior:

  1. Go to Settings
  2. Try to activate "Push Notifications When in Away/XA/DND state"

Expected behavior I should be able to activate the option.

Screenshots

System:

  • Client: iOS, iPhone
  • Server: prosody supporting XEP 0257
  • No problems with the Conversations (Android) client

Additional context It would be great to get push notifications even when the screen is locked, as whatsapp or Conversation (Android) does.

Unknown commented 5 years ago

"Push Notifications When in Away/XA/DND state" is a custom feature that allows you to receive notifications when another client is connected to your account and is in XA/Away state. As it is a custom feature, it is not available on all XMPP servers. Currently, only Tigase XMPP Server supports this feature so it is possible to activate it only for accounts hosted on servers running Tigase XMPP Server.

Unknown commented 5 years ago

I see. Sorry for the spam then.

Is there any way to receive push notification when the screen is locked using a personal server?

Unknown commented 5 years ago

Could you clarify, what do you mean by "when the screen is locked"?

Do you want to receive notifications on a mobile device while another XMPP client on your desktop is connected to your XMPP server?

As for personal server, you may use Tigase XMPP Server for free on your own server as it is open source.

Unknown commented 5 years ago

I mean to receive a notification on the iphone when its screen is locked. The use-case is quite basic I believe, I would like the device to notify the user on new messages even when the phone is in his pocket, similarly to what happens when receiving an SMS. The user don't use any other client.

FWIW, this is what happens for users using the Conversations (android) client with my server.

you may use Tigase XMPP Server

Being an amateur admin, I had a hard time setting up my prosody instance and do not wish to break everything right now, but I will consider it. ☺

Thank you for taking the time to reply!

Unknown commented 5 years ago

In this case, enabling "Push Notifications", what you've already done, should force delivery messages to your phone when the device is locked.

Unknown commented 5 years ago

This is what I was expecting too, but the user receives all notifications at once only after unlocking his phone.

Some additional info that may be relevant:

The user appears offline on my contact list (in Gajim) as soon as he locks his phone. I had him change the Siskin status settings from automatic to online. This successfully got him to not appear away anymore when the siskin app is in the background. But he still appears offline when locking his phone and does not receive "real-time" notifications.

Unknown commented 5 years ago

@truenicoco - could you share your server's hostname? Can you connect to push.tigase.im from your server?

Unknown commented 5 years ago

nicoco.fr

I think it successfully connects to to tigase push server:

# grep -i tigase /var/log/prosody/prosody.log
Jan 14 11:30:13 s2sout55b376ec96c0	info	Outgoing s2s connection nicoco.fr->push.tigase.im complete
Jan 14 11:30:16 s2sin55b3752a25d0	info	Incoming s2s connection push.tigase.im->nicoco.fr complete
Jan 14 11:30:17 c2s55b376489ba0	info	Push notifications enabled for REDACTED@nicoco.fr/iPhone (push.tigase.im<4E90567AE607E5956B9005A1A6CF43C4FB00A6011FB78BD6218A2AE9ECAD4BDF)
Jan 14 11:34:15 c2s55b3754b8a20	info	Push notifications enabled for REDACTED@nicoco.fr/iPhone (push.tigase.im<4E90567AE607E5956B9005A1A6CF43C4FB00A6011FB78BD6218A2AE9ECAD4BDF)
Jan 14 11:39:07 c2s55b375ede320	info	Push notifications enabled for REDACTED@nicoco.fr/iPhone (push.tigase.im<4E90567AE607E5956B9005A1A6CF43C4FB00A6011FB78BD6218A2AE9ECAD4BDF)


Unknown commented 5 years ago

We updated today our services with the aim to improve federation connectivity and your test came after it.

You should be able to receive push notifications now - do they work for you?

Being an amateur admin, I had a hard time setting up my prosody instance and do not wish to break everything right now, but I will consider it. ☺

We do encourage you to try (not necessarily on your main machine) - it should be quite easy to setup (we have web-base installer) and we aim to provide the most sensible and balanced configuration defaults :-)

Unknown commented 5 years ago

Closing the issue due to inactivity.

Unknown commented 5 years ago

What @truenicoco probably means is whether siskin-im supports XEP-0357, which is used by other clients and servers for push notifications. Or does siskin only support a homegrown push notification method implemented in the Tigase XMPP server?

Unknown commented 5 years ago

SiskinIM is XEP-0357 compatible.

Unknown commented 5 years ago

FWIW, it does not work when the iphone screen is off, all notifications are shown at once when the screen is turned on. Unfortunately (?) I don't own an iPhone myself so I cannot test much, but my friend using my server and SiskinIM reports this.

Unknown commented 5 years ago

In our testing, it worked all the time, even if screen was off.

Does Siskin IM has support for processing in the background? If not, then notifications may be delivered to the app only when phone screen is on as (depending on the used server) push notifications may be sent as high priority or low priority (low priority requires additional processing by the app before they can be shown, which may be impossible with background processing turned off).

Unknown commented 5 years ago

"Push Notifications When in Away/XA/DND state" is a custom feature that allows you to receive notifications when another client is connected to your account and is in XA/Away state. As it is a custom feature, it is not available on all XMPP servers. Currently, only Tigase XMPP Server supports this feature so it is possible to activate it only for accounts hosted on servers running Tigase XMPP Server.

@hantu85 Can you elaborate on what the tigase.im server offers in addition to XEP-0357 for push notifications?

Unknown commented 5 years ago

Disclaimer: If this is not relevant for this issue, I can also open up a new one.

I noticed that the client is not woken up by push events if it has gone offline after 15-20 minutes. Server: prosody 0.11 with XEP-0357 support.

Is this what the additional "Push Notifications When in Away/XA/DND state" would be solving?

Unknown commented 5 years ago

No, this feature is for sending Push notifications while you still have another client connected to your account but in state away/xa/dnd.

Unknown commented 2 years ago

In our testing, it worked all the time, even if screen was off.

Does Siskin IM has support for processing in the background? If not, then notifications may be delivered to the app only when phone screen is on as (depending on the used server) push notifications may be sent as high priority or low priority (low priority requires additional processing by the app before they can be shown, which may be impossible with background processing turned off).

I see, I'm not alone here struggling with notifications... Dear truenicoco, did you manage to get your notifications working? (and yes, Siskin IM has background processing enabled on my iPhone)

Prosody community don't bother answering me on their chat, "Please enable modules cloud_notify and cloud_notify_extensions" -- that's all I heard. Checked the luaossl sanity by running some included examples, that was the only weak spot I could think of.

Oh, did I mention that Conversations works every damn time? ;)

Unknown commented 2 years ago

@sirrosh Conversations does not run on iPhone, right? Well, Apple forces devs on their platform to conform, their apps get killed, the only hope is Push, but notifications are not guaranteed to arrive etc.

Try to lookup how Snikket push modules are setup for their docker too.

Unknown commented 2 years ago

Try to lookup how Snikket push modules are setup for their docker too.

Thank you. Something's going on there, I just can't figure it out... yet.

Unknown commented 2 years ago

@sirrosh I am not sure, as I am not using an iPhone myself.

issue 1 of 1
Issue Votes (0)
Watchers (0)
Reference
tigase/_clients/siskin-im#392
Please wait...
Page is in error, reload to recover