-
-
Notifications
You must be signed in to change notification settings - Fork 613
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
changing active
state on the push_notifications_gcmdevice
table
#616
Comments
Have you found an answer to this? |
Unfortunately not.
I'd appreciate any leads though.
Thanks
…On Tue, Oct 26, 2021 at 8:07 PM Egor Novik ***@***.***> wrote:
When and how does the active column in the push_notifications_gcmdevice
table change?
Have you found an answer to this?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#616 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANT6QH3EVGK5YBYZMAVGS23UI3N4FANCNFSM5AUBTXUQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Hi. Today I found answer. It's interesting because out team found a lead in the documentation of another library (fcm-django). It says there:
And I went to look at the code of current library, where found same behavior. There is a comment there
I think it would be nice to have a description of this moment in the readme file |
Great, I'll check it out, thanks!
…On Thu, Oct 28, 2021 at 3:35 PM Egor Novik ***@***.***> wrote:
Hi. Today I found answer. It's interesting because out team found a lead
in the documentation of another library (fcm-django). It says there:
Functionality:
- automatic device pruning: devices to which notifications fail to
send are marked as inactive
And I went to look at the code of current library, where found same
behavior.
https://github.com/jazzband/django-push-notifications/blob/master/push_notifications/gcm.py#:~:text=def%20_cm_handle_response(registration_ids,return%20response
There is a comment there
If error is NotRegistered or InvalidRegistration, then we will deactivate
devices
because this registration ID is no more valid and can't be used to send
messages,
otherwise raise error
I think it would be nice to have a description of this moment in the
readme file
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#616 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANT6QH7VRJJJ7FZR4PDJKMDUJE7RBANCNFSM5AUBTXUQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
So I looked at the docs you mentioned and it seems that the
What happens if the user just deletes the app, or switches phones, would the message to them fail with one of these errors? |
Is there a way to tell if a user has ENABLED push notifications on their device? not just whether or not the device has been registered? |
That would have to be handled via your android/ios/webapp. i.e. on the device, if the user disables notifications, you should send a request to your server to update the device model |
@henderson2350 I just tried this with FCM. Even when I disable app notifications on the phone, the notification is sent successfully from the backend. The blocking is occurring on the phone, so the detection would need to occur there. |
Hi!
I use django with django-push-notifications.
When sending push notifications, I would like to know which users did/didn't get the message.
Currently I use this code after sending the notifications to know how many were sent/not sent:
I noticed this is not 100% accurate as the
active
field does not always reflect the actual users' status.I removed the app and the
active
field was stillTrue
.When and how does the
active
column in thepush_notifications_gcmdevice
table change?Also what does
device.send_message()
return, and what is the meaning of success (ie. sent, active, or received)?The text was updated successfully, but these errors were encountered: