alariej / quadrix

86 stars 7 forks source link

Push notifications #26

Open Ramesh2228 opened 1 year ago

Ramesh2228 commented 1 year ago

Unable to receive push notifications

alariej commented 1 year ago

Hmmm, I'd need a bit more details about your setup. Are you on iOS or Android? Using latest version (1.6.5) of Quadrix? Is your homeserver enabled for push notifications? So far I haven't heard of any user who has problems with push notifications.

Ramesh2228 commented 12 months ago

Thank you for your email

What i did is created one app in firebase with the same namespace like chat.quadrix.android

and i added in google services.json file in android folder

present am working with android

and push notifiactions are enabled on my homeserver

Can you please help me out the get notifications

Thank you

On Thu, Jul 6, 2023 at 10:07 PM Jean-François Alarie < @.***> wrote:

Hmmm, I'd need a bit more details about your setup. Are you on iOS or Android? Using latest version (1.6.5) of Quadrix? Is your homeserver enabled for push notifications? So far I haven't heard of any user who has problems with push notifications.

— Reply to this email directly, view it on GitHub https://github.com/alariej/quadrix/issues/26#issuecomment-1623982466, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZJ6VFTU7QV2Y34CLRHLXTLXO3SUXANCNFSM6AAAAAA2ALEDSA . You are receiving this because you authored the thread.Message ID: @.***>

Ramesh2228 commented 12 months ago

Can i add any other details please let me know

Thank you

On Fri, Jul 7, 2023 at 12:16 PM rameshbabu dasineni < @.***> wrote:

Thank you for your email

What i did is created one app in firebase with the same namespace like chat.quadrix.android

and i added in google services.json file in android folder

present am working with android

and push notifiactions are enabled on my homeserver

Can you please help me out the get notifications

Thank you

On Thu, Jul 6, 2023 at 10:07 PM Jean-François Alarie < @.***> wrote:

Hmmm, I'd need a bit more details about your setup. Are you on iOS or Android? Using latest version (1.6.5) of Quadrix? Is your homeserver enabled for push notifications? So far I haven't heard of any user who has problems with push notifications.

— Reply to this email directly, view it on GitHub https://github.com/alariej/quadrix/issues/26#issuecomment-1623982466, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZJ6VFTU7QV2Y34CLRHLXTLXO3SUXANCNFSM6AAAAAA2ALEDSA . You are receiving this because you authored the thread.Message ID: @.***>

alariej commented 12 months ago

Oh I see. Your app also needs to instruct homeservers to relay push notifications through your own Push Gateway, which also needs your Firebase credentials. The standard push gateway for Matrix is:

https://github.com/matrix-org/sygnal

You then need to specify the URL of the Gateway in the Quadrix config, at:

https://github.com/alariej/quadrix/blob/0fa2fab31306dd07dcfe286af1d27337512df57c/src/appconfig.ts#L45

Hope this helps.

Ramesh2228 commented 12 months ago

Thank you for your support I am very confused to do what you mention above can you please help me to figure it out

On Fri, Jul 7, 2023 at 12:56 PM Jean-François Alarie < @.***> wrote:

Oh I see. Your app also needs to instruct homeservers to relay push notifications through your own Push Gateway, which also needs your Firebase credentials. The standard push gateway for Matrix is:

https://github.com/matrix-org/sygnal

You then need to specify the URL of the Gateway in the Quadrix config, at:

https://github.com/alariej/quadrix/blob/0fa2fab31306dd07dcfe286af1d27337512df57c/src/appconfig.ts#L45

Hope this helps.

— Reply to this email directly, view it on GitHub https://github.com/alariej/quadrix/issues/26#issuecomment-1624889139, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZJ6VFVAFOBQ4ISSAOMURBDXO62ZDANCNFSM6AAAAAA2ALEDSA . You are receiving this because you authored the thread.Message ID: @.***>

alariej commented 12 months ago

Push notifications are not so easy. There is no programming involved, but you'll need to install a Push Gateway application (such as Sygnal) on a server reachable through a URL (for example: https://push.my_matrix_client.com) Each Matrix client (such as Element, Quadrix, etc.) must relay push notifications with an own Push Gateway. Perhaps you should read this document, https://spec.matrix.org/latest/push-gateway-api, which has a nice diagram showing of how push notifications work in Matrix.

Ramesh2228 commented 12 months ago

ok Thank you

Actually am getting this warning "No background message handler has been set. Set a handler via the "setBackgroundMessageHandler" method." Then i add setBackgroundMessageHandler in index,js method am able to get message data but am unable to get notification actually i am getting notification in background console in node server can you please help it out

On Sun, Jul 9, 2023 at 12:29 AM Jean-François Alarie < @.***> wrote:

Push notifications are not so easy. There is no programming involved, but you'll need to install a Push Gateway application (such as Sygnal) on a server reachable through a URL (for example: https://push.my_matrix_client.com) Each Matrix client (such as Element, Quadrix, etc.) must relay push notifications with an own Push Gateway. Perhaps you should read this document, https://spec.matrix.org/latest/push-gateway-api, which has a nice diagram showing of how push notifications work in Matrix.

— Reply to this email directly, view it on GitHub https://github.com/alariej/quadrix/issues/26#issuecomment-1627467451, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZJ6VFV5EY7IXLFV72JOM2LXPGU2LANCNFSM6AAAAAA2ALEDSA . You are receiving this because you authored the thread.Message ID: @.***>

alariej commented 12 months ago

You seem to be very close to solving your problem, but you're actually ahead of me on this and I unfortunately won't be able to help you further. Quadrix doesn't yet implement any background message handler. That's why you can't see any preview of the message on the mobile device when you get a push notification from the Firebase service. Are you able to send test notifications to your mobile device from https://console.firebase.google.com? If you see the notification on your node server, but they don't arrive to your mobile device, then something's probably wrong with your Firebase setup.